summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/selftest/recipetool: Move helper function to the class scopeVyacheslav Yurkov2024-01-191-7/+7
| | | | | | | (From OE-Core rev: 89d37266524ca3e7c9eaf9141b30055ebc39aa76) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: Move create_go test to a proper classVyacheslav Yurkov2024-01-191-13/+11
| | | | | | | (From OE-Core rev: 862b4d2211f2fc81a17def79f06d9672fa5df960) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/SStatePrintdiff: ensure all base signatures are present in sstate ↵Alexander Kanavin2024-01-121-15/+19
| | | | | | | | | | | | | | | | | | | | in test_image_minimal_vs_base_do_configure The test relies on all tasks in the dependency tree of the tasks being changed having valid signatures in sstate, so that the recursive discovery of the base invalid tasks stops there, and doesn't go further. This may not always occur, particularly when hash equivalency combined with different build host architectures prevents them from getting created in regular builds: https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2725/steps/15/logs/stdio The other two tests (that change specific recipes) already ensure this, but this test (which changes a basic task definition) does not. (From OE-Core rev: e37445320ca1a8913d6ed768681ff32de24eef94) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: include fetcher diagnostics into CDN test failure messageAlexander Kanavin2024-01-101-2/+6
| | | | | | | | | | | | | This will help finding out what kind of error the server actually returned, as sporadic CDN failures continue to occur. [YOCTO #15335] (From OE-Core rev: 7f09c4c5a0fe4ff213f205927f618a77b72aeef3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetest: re-enable gcc printdiff testAlexander Kanavin2024-01-101-1/+1
| | | | | | | (From OE-Core rev: 976832eb0c3fc0170a84ff7ab92352ca6f18c383) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: fix up printdiff test to match rework of printdiff logicAlexander Kanavin2024-01-101-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Other than the formatting changes, there are two functional ones: - use perlcross instead of quilt, as quilt is special in the sense of being excluded from task hash calculcations. perlcross is a full participant. - run the full test (local + sstate) for gcc do_preconfiure change as the necessary fix has been implemented (sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches) Note that when several tasks are found to have changed (as is the case when base do_configure is adjusted), find_siginfo() runs glob.glob("*/*/*taskname*") against autobuilder sstate cache for each of those tasks (six or seven times). This is an expensive operation taking several minutes. I left it in for now, but if it's proven too slow the test would have to be reduced to checking a specific base recipe (e.g. zstd-native) rather than a distant image target. [YOCTO #15289] (From OE-Core rev: 0ef7cf324718412c5b6c376acfbc4079ecd7d465) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig/find_siginfo: unify a disjointed APIAlexander Kanavin2024-01-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | find_siginfo() returns two different data structures depending on whether its third argument (list of hashes to find) is empty or not: - a dict of timestamps keyed by path - a dict of paths keyed by hash This is not a good API design; it's much better to return a dict of dicts that include both timestamp and path, keyed by hash. Then the API consumer can decide how they want to use these fields, particularly for additional diagnostics or informational output. I also took the opportunity to add a binary field that tells if the match came from sstate or local stamps dir, which will help prioritize local stamps when looking up most recent task signatures. (From OE-Core rev: 8721c52041e910bd4d8a9235b52f274f4f02c8a3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: selftest: Swap to hello-rs for crates testingAlex Kiernan2023-12-301-1/+1
| | | | | | | | | zvariant fails to build with newer rust (From OE-Core rev: 5928acfe75386c8ebdf58dbd860bbb40243473fd) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: selftest: Fix test_devtool_modify_git_crates_subpath bbappend checkAlex Kiernan2023-12-301-1/+1
| | | | | | | | | | The recipe being tested is in `testrecipe`, use that rather than the literal `zvariant`. (From OE-Core rev: f14ce354890024a3a0a3d4c7efa53eab5db7a6b1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: selftest: Fix test_devtool_modify_git_crates_subpath inequalityAlex Kiernan2023-12-301-1/+1
| | | | | | | | | | test_devtool_modify_git_crates_subpath expects 2 or more git URIs, change the test from Greater to GreateEqual. (From OE-Core rev: 4a8d03db55e6a1b07a8585cbf5fbf735ec51f4a7) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: Update sstate management script tests to python ↵Richard Purdie2023-12-301-6/+2
| | | | | | | | | | | script Now we've switched to the python script, update the tests to match that by removing the now unneeded parameter. (From OE-Core rev: 93989f9b4895506e6ad66a78088a5c2801e2a10d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/prservice: Improve test robustnessRichard Purdie2023-12-241-8/+23
| | | | | | | | | | | | The tests were not cleaning up after themselves and making assumptions about memory resident bitbake being stopped by the scripts. Add cleanup logic to ensure the tests don't break other things and clean up created files. (From OE-Core rev: 692dd762a0c817797c28381c6169205fbaeb2705) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: rustdoc reproducibility issue fix - disable PGOSundeep KOKKONDA2023-12-211-2/+0
| | | | | | | | | | | | | | | | | | | The PGO (Profile-guided Optimization) collect data about the typical execution of a program and then use this data to inform optimizations such as inlining, machine-code layout, register allocation, etc. This optimization is by default disabled in rust sources but enabled in Yocto and causing the reproducibility issue in rustdoc binary. To fix the issue this optimization is set to it's default 'false'. More about the optimization: https://doc.rust-lang.org/rustc/profile-guided-optimization.html With the reproducibility issue fixed, we can enable the reproducibility tests again. (From OE-Core rev: 189c266378c8c4a918cb205b3888577c7ce76856) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: Fix whitespaceRichard Purdie2023-12-201-1/+1
| | | | | | | | | | | | My previous fix missed out whitespace with the append, fix that. (From OE-Core rev: 393c4459851642b8b7e93ff303d6526cd5c97b22) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> # Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/overlayfs: Don't overwrite DISTRO_FEATURESRichard Purdie2023-12-201-1/+1
| | | | | | | | | | | | Whilst debugging an autobuilder failure, I wondered why it was rebuilding qemu-system-native instead of reusing from sstate. The reason was it was overwriting DISTRO_FEATURES, in this case removing opengl which caused much to rebuild. The test doesn't need that so don't do it. (From OE-Core rev: fdcc011608fd9558a081d0ace3eaf7192d9fcaef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: add python_maturin supportTim Orling2023-12-171-0/+29
| | | | | | | | | | | Add the new python_maturin PEP-517 backend Add selftest for 'pydantic-core' pypi package. (From OE-Core rev: 69b679380616a94a631681caa05d9bf7610f9372) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: re-work CDN tests, add local cache testsAlexander Kanavin2023-12-171-32/+67
| | | | | | | | | | | | | | | | | | | | | | | | | With the rework of printdiff, it is not longer useful for checking absence of sstate objects in a remote http cache, as it would only report the top level missing signatures, and leave the recursive investigation to diffsigs (which relies on ability to list cache files - not available over http). The CDN check can be performed by simply running 'bitbake -DD -n' which is very verbose, but neverthless reports the amount of missing sstate objects and what they are in a way that can be programmatically extracted and checked (as suggested by RP). This also adds local sstate tests, as they can be useful to determine whether the missing cdn objects were never created or erroneously cleaned up, or if they were created but didn't propagate to cdn. [YOCTO #15303] (From OE-Core rev: 2a7c653a2eee85e5791a8fdc15857367f0ed0bd9) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sstatetests: Disable gcc source printdiff test for nowRichard Purdie2023-12-161-1/+1
| | | | | | | | | There are some issues with the printdiff code this has identified, disable the test for now until we have patches to resolve them. (From OE-Core rev: 436766983568a8bddc4b9ffa28dc656bf4bf67c1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add tests for C and C++ build toolsAdrian Freihofer2023-12-131-0/+60
| | | | | | | | | | | | | | Add new file for C and C++ build tools. The initial implemmentation contains a class for CMake and one for Meson. At least these first tests for the qemu-usermode share most of the code. That's why there is only one c_ccp.py file and not for example a cmake.py and a meson.py file. (From OE-Core rev: 41390f5202a6ee7472cb82d12c7c32f89d6e52ff) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Disable rust oe-selftestYash Shinde2023-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: fa2d3cda8f7f932c0ed5c534c4bc820af2761cd5) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: fix metadata corruption on meta layerJulien Stephan2023-12-131-11/+4
| | | | | | | | | | | | | | | | | [YOCTO #15314] test_recipetool_appendsrcfile_update_recipe_basic is using base-files as test recipe but modifies it directly which can corrupt metadata for other tests relying on this recipe. So use mtd-utils-selftest as test recipe from meta-selftest to avoid this kind of issues (From OE-Core rev: bf5e6c1b6ceca5a2eda30359d5e5e330278a97e1) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: remove left over from developmentJulien Stephan2023-12-131-6/+4
| | | | | | | | | | | Remove leftover code needed for development that was unintentionally committed (From OE-Core rev: b9a11e6495a27164d095673915edddb2474fdbd7) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: add back checksum checks on pypi testsJulien Stephan2023-12-131-1/+8
| | | | | | | | | | | | | | | | | | recipetool pypi plugin was originally clobbering SRC_URI checksums. Now it doesn't do this anymore: 78ef0313ee6 - recipetool: pypi: do not clobber SRC_URI checksums so add back the checksum checks on pypi tests. Also this commit restrict the checksums: 45d2f8d4bc2 - recipetool: create: Only include the expected SRC_URI checksums so add only the needed ones. (From OE-Core rev: 86164f770032bb66d4497c4e3e7591b7246ac2d9) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix useradd do_populate_sysroot dependency bugRichard Purdie2023-12-101-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | If a task is adde which has a dependency on the do_populate_sysroot task of the recipe, it will cause it to be installed into the sysroot (similar to do_addto_recipe_sysroot). This fails since the postinst script is an overlapping file: Exception: FileExistsError: [Errno 17] File exists: 'tmp/sysroots-components/all/useraddbadtask/usr/bin/postinst-useradd-useraddbadtask' -> 'tmp/work/all-poky-linux/useraddbadtask/1.0/recipe-sysroot/usr/bin/postinst-useradd-useraddbadtask' The copy written out at do_prepare_recipe_sysroot time is just for debug so rename it, meaning there are no longer overlapping files and the installation can be successful, removing the error. [YCOTO #14961] With the bug fixed, enable the test. (From OE-Core rev: 564339afb73fc52a66c1a08437587cad1c4d46e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/bbtests: Add test for unexpanded variables in the dirnamePavel Zhukov2023-12-091-0/+11
| | | | | | | | | Regression test for [Yocto #15255] (From OE-Core rev: 4c31cc114f2cf13c11b7ffd60db0eda1b63cc27b) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: do not delete custom $TMPDIRs under build-st when ↵Alexander Kanavin2023-12-091-12/+10
| | | | | | | | | | | | | | | testing printdiff If the tests fail, these contain useful artefacts, and so should be kept. If the test succeeds the whole build-st/ is deleted. Also, give them unique names, as otherwise the tests would step on each other. (From OE-Core rev: 92e33a19fbcc6c59199fcd8b17ad8ca29ebcd4fd) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetest: print output from bitbake with actual newlines, not \nAlexander Kanavin2023-12-091-4/+4
| | | | | | | | | | Assert*() functions from python unittest would join the multiline output with \n, making it almost unreadable. (From OE-Core rev: 1b01a71e77f70af77887c27be21265ac61f2c9a7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* usergrouptests.py: Add test for switching between static-idsEilís 'pidge' Ní Fhlannagáin2023-12-081-0/+33
| | | | | | | | | | | | This test is related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=12107 At the moment it doesn't seem to be able to actually replicate this issue in the bug, which tells me it's likely fixed. (From OE-Core rev: 2b3fa9981252d41d3f23592715657fe810f834ad) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Add testcase for bugzilla issue (currently disabled)Eilís 'pidge' Ní Fhlannagáin2023-12-081-0/+5
| | | | | | | | | | Add a disabled a test for 14961 - addtask between do_populate_sysroot and do_package breaks useradd class. A fix is still needed for this. (From OE-Core rev: b6af5788f7f8fb1e9d8ad14bd12168ff9d6baa21) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix issues with useradd dependenciesEilís 'pidge' Ní Fhlannagáin2023-12-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | If recipe A requires the useradd actions of recipe B we need to ensure that recipe B is part of the recipe A dependancy chain. In order to do that, we introduce USERADD_DEPENDS. This makes sure that the do_populate_sysroot_setscene of recipe B exists for recipe A in case of a missing TMPDIR. This requires changes made in runqueue.py by RP. This commit along with the runqueue fixes effects: Bug 13419 - recipes that add users to groups cannot rely on other recipes creating those groups (when population from sstate happens) Bug 13904 - do_prepare_recipe_sysroot: postinst-useradd-* does not run in order of dependency and sometimes fails Bug 13279 - Make sure users/groups exist for package_write_* tasks Bug 15084 - For some reason using of same user in two recipes does not work properly I've included the start of self-testing for useradd by adding tests for 13419 (which ends up testing 13904, 13279, 15084 by virtue of them all having the same root cause) (From OE-Core rev: b47f2352376bd16b7e7087b4dab143403e67e094) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: stop looking for md5sumAlexandre Belloni2023-12-081-1/+0
| | | | | | | | | The md5sum is no longer generated by recipetool, stop expecting it. (From OE-Core rev: d9b5f6a2eefa68fcecfca20b293d593f5cd53b7c) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: Update all existing checksums for the SRC_URIPeter Kjellerstedt2023-12-081-0/+48
| | | | | | | | | | | | | In addition to updating the sha256sum and removing the md5sum, update all other existing checksums. If the only existing checksum is md5sum, then replace it with the default expected checksums (currently only sha256sum). (From OE-Core rev: 8ea8827ee49b7f0443b1c4bd47d1344a689d73a3) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: Only include the expected SRC_URI checksumsPeter Kjellerstedt2023-12-081-2/+0
| | | | | | | | | | | | Rather than including all SRC_URI checksums, include the ones that are expected. These are the same as are output if no checksums are included when building the recipe. (From OE-Core rev: c2af83eb5e8573480179b6c0bcce50606b547099) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: Make test_recipetool_load_plugin more resilientPeter Kjellerstedt2023-12-081-5/+20
| | | | | | | | | | | * Avoid trying to write to read-only directories and file systems. * Support symbolic links in BBPATH. (From OE-Core rev: 9a8b621c4d26ff349de88658e6ea21aee6ba6767) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: Make test_devtool_load_plugin more resilientPeter Kjellerstedt2023-12-081-5/+20
| | | | | | | | | | | * Avoid trying to write to read-only directories and file systems. * Support symbolic links in BBPATH. (From OE-Core rev: eba30ce546cda0ae4c3e433b6e79dbab0627157a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: Avoid global Git hooks when amending a patchPeter Kjellerstedt2023-12-081-1/+1
| | | | | | | | | | | To avoid potential problems due to global Git hooks, add --no-verify to a `git commit --amend` command. (From OE-Core rev: 802359c0ec6db0b3a4103f8ad8bc9bed67884555) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: Correct git clone of local repositoryPeter Kjellerstedt2023-12-081-1/+1
| | | | | | | | | | | | | | | If the build environment is setup using `repo`, then poky/.git/object is a symbolic link rather than a directory. To clone such repositories, the source path must be prefixed with "file://". This avoids the following error: fatal: failed to start iterator over '.../poky/.git/objects': Not a directory (From OE-Core rev: 8e3d08cb9274832a346ac3dffa8c9d5f6e93c478) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gdb/systemd: enable minidebuginfo support conditionallyEtienne Cordonnier2023-12-061-1/+1
| | | | | | | | | | | | | | Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it. In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen). (From OE-Core rev: 0d2df803bebfd7e832ab7da54c4dacaaeeb424a9) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: appendsrc: add test for update modeJulien Stephan2023-12-061-0/+28
| | | | | | | | | | | add a basic test for testing the update mode of recipetool appendsrcfile(s) (From OE-Core rev: f999092c772f10d23106c355e2787259befb6e30) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: appendsrfile: add test for machineJulien Stephan2023-12-061-6/+38
| | | | | | | | | | Add a new test for machine specific bbappend override (From OE-Core rev: 1c510a21487fa71e88eb46e9a0de00a82a7ba4e4) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: appendsrcfile(s): use params instead of extralineJulien Stephan2023-12-061-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appendsrc function relies on oe.recipeutils.bbappend_recipe to copy files and add the corresponding entries in SRC_URI. Currently, appendsrc function build itself the new SRC_URI entry to add the correct subdir param, and gives it using the extralines parameter. This has 2 drawbacks: - oe.recipeutils.bbappend_recipe can already do this if we specify the correct params, so we have duplicate code - the duplicated code is not fully functional: for example, it doesn't take into account the -m/--machine parameter So fix this by not using extralines but give correctly formatted params. Also remove the check for already existing entries as oe.recipeutils.bbappend_recipe already implement it The new bbappend file now have the SRC_URI entry after the FILESEXTRAPATHS so fix the selftest. Update test_recipetool_appendsrcfile_existing_in_src_uri_diff_params test because recipetool appendsrcfiles used to not add new src_uri entry if the entry already exist even with different parameters while oe.recipeutils.bbappend_recipe adds it if parameters are different (and remove the old entry) (From OE-Core rev: cd5de8d53849a6f3bb6f82e45fb301e39892c789) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: add test for zerorize option of empty pluginLukas Funke2023-12-061-0/+36
| | | | | | | | | | | Add test for empty plugin which tests whether the plugin creates partitions with actual data which is 'zero'. (From OE-Core rev: 6c6b236b34b35d0e2c020e0f9c447ac35adf8faf) Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool/devtool: add test for pypi classJulien Stephan2023-12-062-31/+85
| | | | | | | | | | | | | | | | | | | | recipetool now supports the pypi class and python recipes can by created using the new following syntax: * recipetool create https://pypi.org/project/<package> * recipetool create https://pypi.org/project/<package>/<version> * recipetool create https://pypi.org/project/<package> --version <version> or the old syntax: * recipetool create https://files.pythonhosted.org/packages/<...> So add tests for the new syntax and modify old tests (From OE-Core rev: 50779b7d45a492e9564005274f1858234a871e10) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: remove spaces on empty linesJulien Stephan2023-12-061-1/+1
| | | | | | | | (From OE-Core rev: 365c3fd9def03e07af025a949e27c4f324fd6094) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Add tests for kernel image installationKareem Zarka2023-12-041-0/+68
| | | | | | | | | | | | | | | | | | | | - test_skip_kernel_install: This test verifies that the kernel is not installed in the boot partition when the 'install-kernel-into-boot-dir' parameter is set to false. - test_kernel_install: This test verifies that the kernel is installed in the boot partition when the 'install-kernel-into-boot-dir' parameter is set to true. Both tests use a WKS (Kickstart) file to specify the desired configuration, build a disk image using WIC, and extract the disk image to a temporary directory to verify the results. (From OE-Core rev: a99bc5ed8bf67f171be24c0e2220aae6cccf230e) Signed-off-by: Kareem Zarka <kareem.zarka@huawei.com> Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: add test for git submodulesJulien Stephan2023-12-011-0/+47
| | | | | | | | | | | | Add a test for gitsm recipes. This tests that we can do changes on submodules, commit them and properly extract the patches (From OE-Core rev: 2fb69161fe9d25691b75a043ec5566ffe4a25b37) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Split rustdoc into a separate packageSundeep KOKKONDA2023-11-271-1/+1
| | | | | | | | | | | The 'rustdoc' is moved to a separate 'rust-rustdoc' package. This is a workaround to test if the main rust binary is reproducible even if rustdoc isn't. (From OE-Core rev: dfed7e63e199009ecca8e2e34f6a823c6e1677e0) Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add test for partition hidden attributesLee Chee Yang2023-11-271-0/+24
| | | | | | | | | | Add test for the --hidden argument introduced in Oe-Core rev 7a111ff58d7390b79e2e63c8059f6c25f40f8977. (From OE-Core rev: 819286cdce6471ca3dd048d3950b943b28e6d222) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/tinfoil: Add tests that parse virtual recipesPeter Kjellerstedt2023-11-231-1/+24
| | | | | | | | | | | | | | | | | Running `devtool search gcc` would result in errors for virtual recipes. The reason was the newly introduced :layer-<layername> override. When tinfoil parsed the recipes using the parseRecipeFile() function, it failed to properly identify the layername for virtual recipes, which resulted in the errors. Add tests that exercise these code paths through parseRecipeFile(). (From OE-Core rev: cf7f34f93f9f90279412ea57d6d5930854d411ba) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: Re-enable CDN testsRichard Purdie2023-11-231-2/+2
| | | | | | | | | I believe other fixes and cleanup means the CDN tests are now working correctly, so enable it. (From OE-Core rev: baabe012e158e387a692b234920eeab977c27440) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>