Also extend implementation to allow defining the diskid for GPT partitions.
Add unit tests for wic.py to cover new setting.
(From OE-Core rev: 0d5da9477703212d3cfb63828c5c38afdb162e43)
Signed-off-by: Steffen Greber <sgreber@lilafast.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Extend the test framework to verify that certain optional nodes are properly
absent from ITS files based on configuration. The _get_req_its_paths()
method now returns a tuple containing both expected and not-expected
paths, enabling negative testing of conditional components.
Test improvements:
- Add verification for absent bootscr, setup, and ramdisk image nodes
when their respective features are disabled
- Extend configuration node testing with proper kernel/fdt/ramdisk
field validation based on device tree and initramfs settings
Code cleanup:
- Remove unused tempfile module import
- Sort bb_vars keys alphabetically in _test_fitimage_py()
- Add debug output for bb_vars overrides when debug logging is enabled
- Remove trailing empty line
- Fix DTB file ordering for consistent test results
(From OE-Core rev: 90dbdacc7f22120b4a96aad2a89b363fdd944079)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Strip debug symbols from test binaries using RUSTFLAGS='-C strip=debuginfo'
to reduce binary sizes from 300+ MB to ~140 MB.
This is especially critical for PowerPC mac99 which has a hardcoded 768MB
RAM limit in QEMU. Without stripping, test binaries uploaded to /tmp (tmpfs)
cause 'No space left on device' errors during test execution.
The size reduction also benefits all other architectures by reducing
memory pressure and upload times during testing.
(From OE-Core rev: ede3ac6f587507f98ffbe9a8b07e21e57c27c986)
Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This test validates bitbake/default-registry/configurations/*.conf.json
against bitbake-setup.schema.json:
INFO - test_validate_bitbake_setup_default_registry (bblayers.BitbakeLayers.test_validate_bitbake_setup_default_registry)
DEBUG - Validating .../poky/bitbake/bin/../default-registry/configurations/oe-nodistro.conf.json
DEBUG - Validating .../poky/bitbake/bin/../default-registry/configurations/poky-master.conf.json
INFO - ... ok
INFO - test_validate_examplelayersjson (bblayers.BitbakeLayers.test_validate_examplelayersjson)
INFO - ... ok
INFO - ----------------------------------------------------------------------
INFO - Ran 2 tests in 110.469s
INFO - OK
INFO - RESULTS:
INFO - RESULTS - bblayers.BitbakeLayers.test_validate_bitbake_setup_default_registry: PASSED (0.92s)
INFO - RESULTS - bblayers.BitbakeLayers.test_validate_examplelayersjson: PASSED (0.19s)
INFO - SUMMARY:
INFO - oe-selftest () - Ran 2 tests in 110.469s
INFO - oe-selftest - OK - All required tests passed (successes=2, skipped=0, failures=0, errors=0)
(From OE-Core rev: 86978295c228640e2c33076d1f51db9f2fe7063b)
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>
* Extract a function "validate_json"
* Read bitbake variables in setUpClass to avoid makeing repeated calls
to bitbake
* Allow to specify the schema relative to $COREBASE/meta/files/
* Specify the Base URI to allow schema to reference each other
(From OE-Core rev: b10b4d5b6376fd828c1cb843ea2e24da298657b6)
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>
Tear down method is executed even when the tests are disabled. This lead
to SSH being used to run commands on the target, and as it might fail
when no SSH server is present, we had to use ignore_ssh_fails=True here.
Instead, remove log file just before it is created: it will remain on
the target after the test is run, but this should be acceptable.
(From OE-Core rev: 8b119b1a0fa618c03fbee1bcc755785fedd2d923)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Setup and tear down methods are executed even when the tests are disabled.
This lead to SSH being used to run commands on the target, and as it
might fail when no SSH server is present, we had to use
ignore_ssh_fails=True here.
Instead, run cleanup tasks in tests themselves and remove the tear down
method.
Also, the wtmp configuration file is not modified since the test was
modified a few years ago: there is no need to backup and restore it.
(From OE-Core rev: c90f79ae221573b2d5100f2d25b12f77e33113d7)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fixes [YOCTO #15909]
SPDX validation was failing due to the use of `crate://crates.io/...` as the
`downloadLocation`, which is not a valid SPDX URL as per the 2.2 specification.
This patch updates `fetch_data_to_uri()` in `spdx_common.py` to detect when the
fetcher type is "crate" and instead use the `url` attribute, which contains a
valid HTTP(S) URL in the expected format, e.g.:
https://crates.io/api/v1/crates/<name>/<version>/download
This aligns the SPDX metadata for Rust crates with the specification and avoids
validation errors in tools consuming SPDX documents.
Tested with the `python3-bcrypt` recipe and verified that the
generated `spdx.json` contains a valid `software_downloadLocation`.
Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15909
(From OE-Core rev: 7cadbd1a22e18847d03b5baa902f5581d3e0aafa)
Signed-off-by: Jayasurya Maganuru <Maganuru.Jayasurya@Windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The last enrty of req_its_fields was not taken into account and the test
passed even if the last entry was not found in the its file.
(From OE-Core rev: 34e872ab23067231fb93c3b31ad5a439e9c17cb8)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rightnow rust depends on llvm instead of rust-llvm
Setup in rust-llvm
CFLAGS:remove = "-g"
CXXFLAGS:remove = "-g"
Setup in llvm
DEBUG_LEVELFLAG = "-g1"
As a result, the stage1 compiler crate binaries include debug symbols,
increasing their size. These binaries are used to run tests inside QEMU.
To accommodate this, increase the QEMU RAM allocation to 1024 MB.
(From OE-Core rev: 1c87bca91c61a272266a0f2763e0477b66f06c13)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The test was written assuming poky was being used. Update
the revisions to match OE-Core instead.
(From OE-Core rev: 5965ae92c866817a0bab54d240b1d197da37df2a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, the definitions of MIRRORS and PREMIRRORS made by
test_yocto_source_mirror() are overwritten when run on the autobuilder:
* MIRRORS = "" is extended by mirrors.bbclass to its usual value.
* PREMIRRORS = "* dl.yp.org" is overwritten by the autobuilder.conf
config fragment to ""
Simplified variable history:
# $MIRRORS [4 operations]
# set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3
# ""
# append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57
# "${DEBIAN_MIRROR} ..."
MIRRORS=" http://deb.debian.org/debian/pool ..."
# $PREMIRRORS [4 operations]
# set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18
# " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ..."
# set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6
# ""
# append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84
# "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..."
PREMIRRORS=" git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..."
Despite this unexpected configuration, the test passes because after
failing to find a PREMIRROR (empty), failing to download the normal
SRC_URI (because of BB_ALLOWED_NETWORKS), the fetcher tries the MIRRORS
which have by default download.yoctoproject.org. For example, on a
failed meta-oe-mirror test[0], we can see a lot of warnings:
"stdio: WARNING: ... do_fetch: Failed to fetch URL https://... attempting MIRRORS if available"
By using the ":forcevariable" override, test_yocto_source_mirror() makes
sure the correct value is set for MIRRORS and PREMIRRORS (whatever is
the configuration).
Simplified variable history (after the fix):
# $MIRRORS [4 operations]
# append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57
# "${DEBIAN_MIRROR} ..."
# append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:68
# "git://salsa.debian.org/.* ..."
# override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3
# ""
MIRRORS=""
# $PREMIRRORS [4 operations]
# set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6
# ""
# append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84
# "git://sourceware.org/git/glibc.git ..."
# override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18
# " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..."
# pre-expansion value:
# " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..."
PREMIRRORS=" bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..."
[0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/82/builds/470/steps/17/logs/warnings
Fixes [YOCTO #15993]
(From OE-Core rev: ab810d1239d4db0bc0f23db31c70cc9c6e59357e)
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>
Specifically:
- when using integrated poky, autobuilder clones it into 'build', rather than 'poky'
- do not use a catch-all default to tweak the commit id openembedded-core, rather make it specific to that
repository.
(From OE-Core rev: 9a77dea19b0a9b07a21648e6f231d936d7387846)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.
Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.
This information was sourced from https://www.gnu.org/prep/ftp.html
(From OE-Core rev: f3046716c9c565e6f65d5169694cd3da126cfaeb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.
Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.
This information was sourced from https://www.gnu.org/prep/ftp.html
(From OE-Core rev: b8cd34e56819e13fd374210cf67d6952d1f2586d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is the SSH test, it makes sense to ignore SSH failures in the SSH
helper and manage them in the test body.
(From OE-Core rev: 2281fd4c10e38a3cad3050b7a21a72cc7b09e718)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Postactions are not part of the tests but allow to retrieve useful data
from the target. They try to do this using SSH, but this can fail when
no SSH server is present on the target. Ignore these fails.
(From OE-Core rev: b7b3db490f9cdf99e71f114aec9fc8ad5c1d1d56)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tests using SSH will fail when no SSH server is present on the target.
These tests are disabled in these cases, by being marked with a
dependency on ssh.SSHTest.test_ssh, which in turns has a dependency on
having either dropbear or openssh-sshd in the image.
But setUpClass() and tearDownClass() functions are always executed, even
on tests failing the dependency checks, leading to unexpected failed
tests.
Ignoring SSH errors in setup and tear down allows to avoid these test
errors.
(From OE-Core rev: 5bcc914cf5a193137cddc004f3b38b7b04af9ecb)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Most tests running SSH commands ask for no error to be raised when the
returned status is not 0. As run() will return this status, they may
later use its value to do a similar check on their own, or completely
ignore it. But most of the tests do not check if the non-zero status is
caused by a fail of the command run on the target or by a fail of SSH
itself.
This can lead to confusion when the error does not come from the command
executed on the target but from SSH itself: test might wrongfully be
marked as PASSED or might fail with incoherent errors.
As SSH errors are always reported with exit code 255, we can easily
filter these.
Modify OESSHTarget.run() behaviour so an AssertionError is raised on SSH
failures, even when ignore_status parameter is True. Still allow to
explicitly ignore this error for the rare cases where this can be
needed.
(From OE-Core rev: afe118d4f2de1f636b3a81dc692da35b35a3f2d7)
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
While all but the osc fetcher ignore the third parameter of their
latest_revision implementation, 'default' isn't a valid name in general.
Since commit 2515fbd10824 ("fetch: Drop multiple branch/revision support
for single git urls") in bitbake a fetcher only handles a single
branch/revision and the only sensible thing to pass is `ud.name`.
(From OE-Core rev: cb36e8a62d7d31b75b3ddc6b84c1bdee09ebbc60)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This too used to work by coincidence: sourcing the environment
quietly failed without changing to the build directory, but
now that it works properly, things should be done in correct order.
(From OE-Core rev: ed98173057fa128ff565e1e1078b150ca14a85e0)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rather than using auto.conf which already has established use in CI, or
local.conf which users expect to own/control, start writing "tooling"
controlled settings to a toolcfg.conf.
This frees CI to handle auto.conf as it wants, but avoids the tooling
breaking users local.conf files.
(From OE-Core rev: 3f8616e56b604d7b77a12334a6ce76d265de7323)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If USER_CLASSES is unset, the test was failing. Fix that.
(From OE-Core rev: 7be456e675a17344aedaa65a10ecaa015bf3803a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
These tests need buildstats to be configured. Add that piece of
config in case it isn't by default.
(From OE-Core rev: d1962257783ed9348be9fdd2db20b7d2b7c37ce1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
With config fragments, changing MACHINE in the test like this no
longer works. Use the forcevarable override to allow it to work.
This also needs a tweak to bitbake to work correctly, sent
seperately. Whilst ugly, this avoids the need to start changing
config fragments within oeqa right now.
(From OE-Core rev: 2323fe87eefc8017ac93ed98b1bea24996f2276b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oe-selftest sets up separate build directories to run the tests in.
To to this, environment paths pointing at the previous build directory
are updated. In the multi-threaded case this is fine as the thread is
destroyed and the parent remains unchanged but in the single threaded
case, the environment is broken afterwards. This can mean we try and access
a directory which is in the process of being deleted (e.g. by clobberdir).
Restore the environment afterwards regardless to ensure the single threaded
case doesn't try and access the build directory which is now being deleted.
(From OE-Core rev: a165bec28ffc75fd44b1fdb02a0d3a80c5a4769b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This amends the recently merged commit that assumes the transition
to separate repositories has already happened and re-instatates
support for integrated poky.
(From OE-Core rev: 517666671ba2cc79b2ada3390d4ae0f2beb95caf)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Without importing PATH from the wic-tools recipes, the build host PATH
is used and this test may fail depending on tools (parted, dumpe2fs,
...) availability. This triggers build faillure on AB (e.g. [0])
To fix this, import PATH from wic-tools and ensure the original
environment is restored after.
Since this indent a block of code into a try/finally block, here is the
diff ignoring white spaces change:
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index bff3842305..bc99673d0d 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1680,0 +1681,4 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot"
+ oldpath = os.environ['PATH']
+ os.environ['PATH'] = get_bb_var("PATH", "wic-tools")
+
+ try:
@@ -1696,0 +1701,3 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot"
+ finally:
+ os.environ['PATH'] = oldpath
+
[0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2456
(From OE-Core rev: 9dfd4f44d4f40e7926dc88cb564baa2345c2a24f)
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>
Without importing PATH from the wic-tools recipes, the build host PATH
is used and this test may fail depending on tools (parted, dumpe2fs,
...) availability. This triggers build faillure on AB (e.g. [0])
To fix this, import PATH from wic-tools and ensure the original
environment is restored after.
Since this indent a block of code into a try/finally block, here is the
diff ignoring white spaces change:
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index b1c318bd4e..34d844b90b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1331,0 +1332,4 @@
+ oldpath = os.environ['PATH']
+ os.environ['PATH'] = get_bb_var("PATH", "wic-tools")
+
+ try:
@@ -1366,0 +1371,2 @@
+ finally:
+ os.environ['PATH'] = oldpath
[0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2456
(From OE-Core rev: a6278a199807f1ad7ed1e27ec352af46e03e8b67)
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>
The extra_partition plugin allows populating an extra partition with
files listed in the new IMAGE_EXTRA_PARTITION_FILES variable. The
implementation is similar to the bootimg_partition plugin.
This plugin provides an easy way to install files that are not part of
the rootfs, from the deploy directory.
(From OE-Core rev: 3892912bd7e047a3b122ae910ac5fbd5a85117b8)
Signed-off-by: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr>
Reviewed-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>
The autobuilder is being transitioned to bitbake-setup which
sets up individual repositories that yocto is made of. Adjust
hardcoded revisions to match these repositories.
(From OE-Core rev: d22744cc176524e83cc52d0800ce39b0070e261c)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There was a flaw in the logic that allowed multiple builtin fragments with
the same prefix to be enabled at the same time. The correct behaviour
is that only one of them should be enabled, and when enabling it
all previously enabled fragments should be removed.
The issues that this caused are further explained in
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15987
[YOCTO #15987]
(From OE-Core rev: aea2d69d0533bf005cd58eb91fd9b3a3ae194610)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is for fixing reproducible issue for package like:
intel-speed-select-src. For intel-speed-select, one of the debug sources
is /usr/src/debug/intel-speed-select/1.0/include/linux/thermal.h,
file include/linux/thermal.h under ${S} (kernel-sources)
link file include/linux/thermal.h under ${B}, which link to ${S}/include/uapi/linux/thermal.h
During copy debug sources, sources under ${S} copied first, then sources
under ${B} is copied. mtime of ${S}/include/linux/thermal.h and
${S}/include/uapi/linux/thermal.h are decided by when it is fetched, so
it is not determinate, maybe same or different.
For cpio, if the in file is older than or the same as the exist file,
cpio will not replace the exist file with warning "cpio: xxx not created:
newer or same age version exists". And this will cause
intel-speed-select-src maybe not reproducible.
And option '-u' for cpio, first, this will make the copied file
determistic. Second, source files under ${B} should have higher priority
then ${S}, it may be generated during build, the target is more likely
to use this file.
(From OE-Core rev: 8898f97b4acc9d5c2c6583c91d05327f9093133e)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add discussed in [1], our best option for customizing built-in fragments
is to pass them from a layer configuration. In short, the reason is that
our statement must be parsed before the addfragments call is parsed.We
also have to use the :append override as using += would override the
original definition of OE_FRAGMENTS_BUILTIN (since it uses a ?=
assignment).
Provide a test case for customizing built-in fragments with
meta-selftest.
[1]: https://lore.kernel.org/yocto-docs/20250925-fragments-v1-0-c9f747361fb2@bootlin.com/T/#m9f7c9f110c084eba17e0f64d8b2ac7a88af3f38e
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
(From OE-Core rev: 38cbf4c0ce5173dc3080fa0fbb3ec3e7926c8137)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
'Layer ID' isn't a commonly used term in our help messages or
documentation, so clarify that this is the identifier used for the new
layer in BBFILE_COLLECTIONS.
Also clarify that the default is the basename of the layerdir argument
if a layer ID is not separately provided.
(From OE-Core rev: bb8bd71b1aba31aeb0c1d2fbcae36da26865dc57)
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
For a recipe that uses more than one git repo there isn't a single
SRCREV variable. For example for linux-yocto there is SRCREV_machine and
SRCREV_meta and rd.getVar("SRCREV") yields "INVALID".
Luckily bb.fetch2 already handles all the details and exposes the
currently used revision in ud. So just use that.
(From OE-Core rev: ddf00d6aee955878c070327ee8d751fdb6099444)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Cleanup some indirect imports. This does not solve a real problem, but
it fixes some issues with IDEs that do not properly resolve indirect
imports.
(From OE-Core rev: b1b460c8b1c8047d9fb08287036a0b4f5446b7cb)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The test-patch for test_src_uri_left_files selftest got out of date.
This patch updates it to make it apply on the repo again.
(From OE-Core rev: 64f1c284256852093027e494c64f1cbe63999e27)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The test_src_uri_left_files check prepares a list of patchfiles SRC_URI from
before and after the patch is applied, looking for dangling patches.
The name of the files in this list can be incorrect, in case the URI contains
some extra metadata (like patchdir), because os.path.basename will use the last portion
of the line being processed, which is independent from the files in question.
To avoid this, try to use only the first portion of URI, before any extra metadata.
(From OE-Core rev: 7c0febd01e39c6d6a8b7821adcda5f397d597bee)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Call it like a function to avoid it being interpreted as True always.
(From OE-Core rev: df73a692049675b7dc110779b7853f2e79a61737)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Patchtest tries to apply the received patch on the repository, without
specifying the directory, which means that the CWD is used. In case the
patch modifies a content in a different folder (e.g. the script is running
in ./meta, but the patch modifies ./meta-selftest), the patch will be skipped,
but git still returns 0, instead of complaining.
To avoid such false positives, specify the working directory for applying the
patch - the top of the repodir.
(From OE-Core rev: 6c7bb23b05ab613d5efe8e1378d7e1b1cc8cfc45)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
- Add meta/lib/oeqa/sdk/cases/go.py with GoCompileTest and GoHostCompileTest classes
- Test validates Go cross-compilation toolchain functionality
- Includes native compilation, cross-compilation, and Go module support
- Uses dynamic architecture detection for portability
(From OE-Core rev: 17015f692a6bf3697a89db51bbc4673a5efa1497)
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
extend go runtime test with a simple test file, and simple
go module test to validate go compilation and execution on
target.
(From OE-Core rev: e3b2b9170f76f4bbdc41ea6ba7bccffc17d01968)
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
BitBake's Python expansion syntax looks very similar to GitHub usernames:
${@foo} - which triggers a false alarm from patchtest.
This patch adds a negative lookahead to the GitHub username matching pattern:
only match in case the pattern doesn't start with "${" characters.
Also add a test for it.
(From OE-Core rev: 6aa8eeadbb626bb5e5459ac2caf73b8fb0f2b936)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Give out useful information when a package could not be matched.
Before the change:
error: opkg_solver_install: No candidates to install catch2 (null)!
With this patch:
error: opkg_solver_install: No candidates to install catch2 (null)!
...
catch2 is a recipe. Its generated packages are: ['catch2-src', 'catch2-dbg', 'catch2-staticdev', 'catch2-dev', 'catch2-doc']
Either specify a generated package or set ALLOW_EMPTY:${PN} = "1" in catch2 recipe
(From OE-Core rev: 4bcb97ab4d7622d04dbf71930ea1784c8d57c136)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Give out useful information when a package could not be matched.
Before the change:
E: Package 'catch2' has no installation candidate
With this patch:
E: Package 'catch2' has no installation candidate
catch2 is a recipe. Its generated packages are: ['catch2-src', 'catch2-dbg', 'catch2-staticdev', 'catch2-dev', 'catch2-doc']
Either specify a generated package or set ALLOW_EMPTY:${PN} = "1" in catch2 recipe
(From OE-Core rev: ca6c1dd0148c4776bd556fccfd71153fc72d2e3d)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>