Commit Graph

35 Commits

Author SHA1 Message Date
Richard Purdie
81ad1de523 selftest/buildhistory: Move test cases to common location
Having the test cases split in different places makes no sense. Move them
all to the place you'd expect to find them. Drop the base class as it
is no longer needed.

(From OE-Core rev: c5a8a1dc637206fa398c639c49531f709e5b002f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Ross Burton
1c5a2c8bcc oeqa/poisoning: fix gcc include poisoning test
The test code in poison was flawed: as long as one CPP/CC/CXX has fatal
poisoning enabled then the test passes.  However, at the moment due to
a bad rebase only CPP has fatal poisoning and CC/CXX do not.

Rewrite the do_compile() task to more carefully check the output so the
test harness itself just has to bitbake the recipe.

Note that this results in the test failing:

  ERROR: poison-1.0-r0 do_compile: C Compiler is not poisoned.
  Exit status 0, output:  cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
  ERROR: poison-1.0-r0 do_compile: C++ Compiler is not poisoned.
  Exit status 0, output:  cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]

(From OE-Core rev: 5b413d1fdb4bdbaec86d630bb52c3ccf68aae789)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-22 13:20:29 +00:00
Richard Purdie
c118d19588 oeqa/selftest/buildoptions: Use continue option in source mirrors test
It is helpful to see all the issues in the source mirror test so
use the continue option.

(From OE-Core rev: f52e7ddc6ca5ce03cbcdf3cc15fc04f3ff31cd5c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-25 11:54:48 +01:00
Alexander Kanavin
d12a3f1025 hicolor-icon-theme: upgrade 0.17 -> 0.18
(From OE-Core rev: 7ca759f98a46d9fcf485edc3eeff4e9cf73a4669)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:27 +01:00
Alexander Kanavin
46d4072a97 selftest: always tweak ERROR_QA/WARN_QA per package
Globally changing it completely destroys sstate reuse, as seen for example here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/3763/steps/14/logs/stdio

(From OE-Core rev: 9c75c11f4f6816cfc56eb85a43859a228a5d2950)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:26 +01:00
Alexander Kanavin
d180e9f1c2 selftest/buildoptions: tag the download mirror test with 'yocto-mirrors'
This will allow bundling all yocto mirror tests together, both for
the purposes of running only them specifically,
and excluding them from 'general' oe-selftest runs.

There is an upcoming test for sstate cache served over content
delivery network which will use the same tag, so it can be run
together with this.

(From OE-Core rev: 2a3f69b83ed10622d6a39774528dbfaebb3e5ded)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-20 13:54:23 +01:00
Ross Burton
947f7d7b8c oeqa/selftest: don't skip test_read_only_image on qemuarm64
There's no need to skip this test anymore, as skipping on qemuarm64 was
a proxy for "uses SERIAL_CONSOLES_CHECK" which no longer exists.

[ YOCTO #14962 ]

(From OE-Core rev: 1b8b1cb74c8f5f387a14d86f03f37f68c07dd9aa)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-11 09:43:45 +01:00
Ross Burton
4c790357bf oeqa/selftest/buildoptions: skip test_read_only_image on qemuarm64
qemuarm64 currently uses SERIAL_CONSOLES_CHECK but this is incompatible
with read-only rootfs under sysvinit.  Until qemuarm64 doesn't use this,
skip the test on qemuarm64.

(From OE-Core rev: c46be833efc5abea577251ef7e87ef90f08c4de3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-11 13:43:40 +00:00
Richard Purdie
ce08cf4825 lib: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also add license identifiers as MIT if there isn't one.

(From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 12:00:43 +01:00
Ross Burton
668753b8ed oeqa/selftest: remove unused imports
(From OE-Core rev: 7ef7b03eeefc0a9911fd62c73e346fa5aeeb09eb)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
Ross Burton
dd6987f49b oeqa/selftest/buildoptions: set PACKAGE_CLASSES in test_arch_work_dir_and_export_source
test_arch_work_dir_and_export_source uses the archiver to generate SRPMS,
so explicitly set PACKAGE_CLASSES to ensure that package_rpm is used.

(From OE-Core rev: 030157fa8dd405be60c55523e074b2ec950d36ad)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
Scott Murray
ed198efba4 local.conf/oeqa: Update BB_DISKMON_DIRS use
Update the example BB_DISKMON_DIRS definitions in the sample
local.conf files for the rename of the "ABORT" action to "HALT",
and also update related error messages in one selftest to use
the new action name.

(From OE-Core rev: ccb63df13501968502fc0da8ced80b934d6d846e)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:27 +00:00
Richard Purdie
d10ce1059d archiver: Default to xz compresison instead of gz
We should default to xz or zstd instead of gz, pick xz for now as it is more tested.

(From OE-Core rev: 658f274c161ec67b91f133ee9b5c3767c2925787)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:56:47 +01:00
Ross Burton
34062ffb4f oeqa/selftest/buildoptions: test buildhistory PKGSIZE and FILELIST fields
Add tests to ensure that PKGSIZE and FILELIST fields are set correctly.

(From OE-Core rev: 8e957f9dbf794195af093f3fbc00b4c8d269ee37)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-17 09:53:04 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Alexander Kanavin
06413d33b3 oeqa/selftest: transition to weston images
For readonly rootfs tests core-image-weston
is appended; everywhere else it replaces core-image-sato.

(From OE-Core rev: 75e042db853b9bf9a70ff8a5abe6d45ebb0b77a9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-27 15:11:47 +01:00
Richard Purdie
227a93441f oeqa/selftest: Hardcode test assumptions about heartbeat event timings
Setting a value of 10 for heartbeat events causes the test to fail. Hardcode
a value to ensure it works correctly even if the default is changed.

(From OE-Core rev: 08b2c9a23ce43ed65a16f5f0714b19a571e1b54a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-16 13:37:08 +01:00
Ross Burton
b0df39edd7 oeqa/selftest: add test to verify that poisoned sysroots are detected
Add a recipe that explicitly searches /usr/include, and use that in
oe-selftest to verify that host include paths are correctly causing
build failures.

(From OE-Core rev: b3e3eba796b843021b264f0e98dc30f983775d58)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10 10:30:39 +00:00
Robert Yang
e56305dd70 oeqa/selftest: binutils-cross-x86_64 -> libgcc-initial
The binutils-cross-x86_64 is not avaliable for non x86-64 machines.

(From OE-Core rev: 02385b180bc4a1af7120e85a9998566bfcb85977)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20 22:46:18 +00:00
Robert Yang
f13a95e17e ccache.bbclass: Use ccache-native and disable ccache for native recipes
Since host's ccache is not reliable, so disable ccache for native recipes and
use ccache-native for other types of recipes. We need disable ccache for native
recipes is because ccache-native now depends on cmake-native which causes
circular dependencies, and it's not easy to break the circular.

(From OE-Core rev: 631bbd4896882ba2acbe5bc85bc90ab7abc794ef)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20 00:45:05 +00:00
Robert Yang
220a5fcb99 Revert "ccache.bbclass: use ccache from host distribution"
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8.

Will use ccache-native which is more reliable.

(From OE-Core rev: 1b659623430e1a6e6dd266e65bab7ca8155a7138)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20 00:45:05 +00:00
Alexander Kanavin
95c76b9bd4 ccache.bbclass: use ccache from host distribution
ccache 4.x has hard dependencies on cmake-native (used as
build system) and zstd, which means inserting ccache-native
as DEPENDS into everything creates circular dependencies which
are impossible to break.

ccache 3.x did not have this problem as it used plain makefiles
and an in-tree copy of zlib.

(From OE-Core rev: f5b29367af4d8e5daea5771264774aa49519f9a8)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-31 11:53:26 +00:00
Denys Dmytriyenko
d71fb563c1 buildhistory: fix "version went backwards" QA error message
Fix parentheses placement in the message from:
Package version for package X went backwards which would break package feeds from (Y to Z)
to this one:
Package version for package X went backwards which would break package feeds (from Y to Z)

(From OE-Core rev: 3a5a61fb6b3f811bd4f7232ba902afcfd2019154)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:20:59 +00:00
Ross Burton
bb75a12425 oeqa/buildoptions: check that Fortran code actually cross-compiles
Don't just test that we can build the cross-compiler, but test that it actually
can cross-compile some Fortran.

The quadmath dependency is now handled in gcc-runtime and isn't needed in this
test (as per local.conf.sample.extended changes).

There's also no need to build libgfortran explicitly, as fortran-helloworld depends on it.

(From OE-Core rev: 4b43c655ed5ff8b9d2662730526811220b21ff8c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
c7592b0147 oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test
names to definitively reference tests and the IDs can be dropped, along with their
supporting code.

(From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Robert Yang
227aafa1cf oeqa/selftest/cases: Update test_ccache_tool
Now we can compile m4-native rather than target m4, this can save a lot of
build time.

(From OE-Core rev: 8e33cef647f4e8a104da61aecab4ac6c6b9bfd3b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14 11:35:55 +00:00
Chen Qi
89dd30049b buildoptions.py: use different STAMPS_DIR and SSTATE_DIR
Use a different STAMPS_DIR and SSTATE_DIR in test_yocto_source_mirror.
Otherwise, when executing `oe-selftest -a', we will get a lot of failures
due to do_unpack failure.

(From OE-Core rev: f8502c68163ec288cf6fb6754829b455501b4a05)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08 11:16:44 +00:00
Richard Purdie
5c7f5e2d3b oeqa/selftest/buildoptions: Ensure diskmon tests run consistently
Heartbeat events default to once a second and we need to ensure we have
enough time in the task to see them.

Add a nostamp delay task 5s long so we can have a consistently timed
task which doesn't need cleanup or have unneeded dependencies. This
ensures we should deterministically see the disk moinitor events
regardless of the state of the build. This is done in a way which
doesn't corrupt build state or need cleanup and is efficient.

(From OE-Core rev: ecc49ee8986929e2429d948000a0ca588fe63959)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
91f838e036 oeqa/selftest/buildoptions: Improve ccache test
This test occisionally fails as m4 doesn't recompile, meaning the logfile test
then doesn't find mention of ccache.

To ensure m4 does recompile, clean m4 before force compiling it.

(Reading the test is confusing due to the test cleanup also involving a clean)

(From OE-Core rev: 6e0b9214a0d57ed45a5df0ba5c9887a9045b89b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
e865e4e703 oeqa/selftest/buildoptions: Improve ccache test failure output
The current failure mode doesn't show us what the logs actually looked like
and later cleans can lose them. Show the whole log in case of failure
to aid debugging intermittent problems on the autobuilder.

(From OE-Core rev: 7c3a0dc5978cea898b1ca51decf4d6e7cf9d519f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
36df73a523 oeqa/selftest: Add test for Yocto source mirror functionality/completeness
We've had a number of occasions where the Yocto Project source mirrors have not
been complete or functioning correctly. This adds a test so that if this happens
we find out out it sooner.

It also only works over http meaning we should be able to test that anyone behind
an http only proxy (no git protocol) also has functional fetches for OE-Core and
layers built by the core of the project.

(From OE-Core rev: 9a25b2eb9cc13dd77a774dad83067ea5f9bf9716)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
04315672fc oeqa/selftest/buildoptions: Add test for fortran compiler building
(From OE-Core rev: 84d6be8ceb14b418b059212108c5a71a5950e6c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-21 10:21:00 +00:00
Ross Burton
7b5e524c8e oeqa/buildoptions: remove unsafe-references-in-script test
This QA test is about to be deleted, so remove it from selftest.

(From OE-Core rev: b9faf41ddc4510d484b5cbe8d182d8288fe00773)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-13 09:27:38 +01:00
Leonardo Sandoval
157c3be2ca oeqa/selftest/cases: Migrate test cases into the new oe-qa framework
New framework has different classes/decorators so adapt current test cases to
support these. Changes include changes on base classes and decorators.

Also include paths in selftest/__init__.py isn't needed because the
loader is the standard unittest one.

(From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-06 19:02:43 +01:00