Commit Graph

7 Commits

Author SHA1 Message Date
Yoann Congal
131872001a oeqa/selftest: add a test for bitbake "-e" and "-getvar" difference
This is a non-regression test for [YOCTO #15638]

(From OE-Core rev: 22b508da24e0f7e5ad8ce4e090832bd0829963f0)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-18 22:09:03 +00:00
Adrian Freihofer
2c27b231f9 oe-selftest: fitimage drop test-mkimage-wrapper
Rather than writing hints into log files and verify the hints can be
found, the tests should verify that the artifacts in the deploy folder
are correctly signed. This is a much better test.
u-boot-tools provide a utility fit_check_sign which can verify the
signatures in fit images. Lets use it.

grepping in temp/run. or temp/log. files also does not work if the tasks
runs from sstate and the corresponding run file is not even generated.

(From OE-Core rev: 86e504b4f792eeadd67ea57dd71a62bcb4f16f02)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-13 23:28:30 +01:00
Ross Burton
41e59c53c5 selftest/classes: add localpkgfeed class
This class can be used to construct a subset of a deployed package feed
for use in tests which iterate the deploy directory, and as such a huge
feed of 30K+ packages can result in very slow tests.

(From OE-Core rev: c5486d6ad32457f09c104d5dd31314bd570912d3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 16:39:19 +01:00
Richard Purdie
c6276d8e57 oeqa/selftest/sstatetests: Fix intermitttent errors and improve performance
You could reproduce an error in this test with:

bitbake core-image-minimal
bitbake tzcode-native -c cleansstate
oe-selftest -r sstatetests.SStatePrintdiff.test_image_minimal_vs_base_do_configure

since tzcode-native isn't needed once tzdata is available and isn't rebuilt
by "bitbake core-image-minimal" if it is missig. tzdata is allarch so if tzdata is
built on an x86 host, a aarch64 build machine would never build tzcode-native with
this set of calls.

Add a --runall option to the initial bitbake invocation to force these things to be
created if they're missing.

This explains why some failures were occurring on the infrastructure. With that issue
fixed, drop the hash mode change since I believe this fixes that issue. That
restriction was hurting performance, this should allow sstate reuse for the test
and improve the speed of it.

(From OE-Core rev: 8f03ac39e7fe21f3d6eca35b12b203a73a15285d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-09 11:45:37 +00:00
Alexander Kanavin
2187e823ad selftest/sstatetests: add tests for 'bitbake -S printdiff'
'bitbake -S printdiff' is a useful diagnostic facility for finding out
why sstate is not being reused, but until now it had no tests that would
ensure it works. This commit adds three basic scenarios:

1. make a change in a really basic, common recipe that is at the very root
of dependency trees (quilt-native), and ensure that change is correctly discovered when
building an image.

2. make a change in gcc-source recipe, which is somewhat special
(operates in work-shared), and ensure that gcc-runtime builds track
that down as well.

3. make a change in base_do_configure() definition from base.bbclass,
which is not recipe-specific, but affects many basic recipes, and ensure that
is correctly reported as well.

The test itself actually runs twice:
- first against a fully populated build directory, where
the printdiff code is guaranteed to find the correct previous
stamp that can be compared with in a predictable manner.

- then in an empty build directory where the printdiff code
goes to look in the sstate cache, and so the existence of the
previous signature can be tested, but not the difference with it
(what the exact difference would be is unpredictable as the
sstate cache is indeed shared between many builds).

(From OE-Core rev: 7a7d76aa8a8d590ebc99156f9f4b9535cdf868c7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 10:53:43 +01:00
Paul Eggleton
87b38ee1c1 oe-selftest: fitimage: add test for signing FIT images
Add a new test to verify signing FIT images. Also includes testing for
the newly introduced FIT_SIGN_INDIVIDUAL, UBOOT_MKIMAGE,
UBOOT_MKIMAGE_SIGN, and UBOOT_MKIMAGE_SIGN_ARGS variables.

(From OE-Core rev: 3c054762278fd8c5dd827dbac15f4fa066e6c19e)

Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20 00:03:04 +00:00
Corneliu Stoicescu
b9afc0d262 meta-selftest: create a new test layer to be used by oe-selftest script
Everything in this layer is meant to be used by tests called by
scripts/oe-selftest. These are helper recipes/appends to test various bitbake
options or scripts.
Currently most of these files here only have "include test_recipe.inc" which
is the file tests will actually use.

(From OE-Core rev: 71a5053eea2aa0055663ccb2318eda866df49bb7)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00