summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/core/decorator: add decorators to skip based on HOST_ARCHRoss Burton2025-07-181-0/+24
| | | | | | | | | | | | | | | There are already decorators to skip on the value of MACHINE, but for flexibility it's better to skip based on the target architecture. This means, for example, the ISO image tests could skip if the architecture isn't x86. (From OE-Core rev: a8381f4b7d7c294d9ad8a9d3f0b1f7c409753716) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 0c21ff0a92906b6b4820eb8beddf8762fe70653d) Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/packagedata.py: Add API to iterate over rprovidesJoshua Watt2025-02-151-0/+15
| | | | | | | | | | | | | Adds an API that makes it easier to iterate over the package data for a all providers of a runtime dependency. (From OE-Core rev: 68bdc219a4a819e83217f5b54c463624af8d3b9e) (From OE-Core rev: 579717212ba2892e32315788ccd65320556d32a3) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/gitarchive: Return tag name and improve exclude handlingRichard Purdie2024-12-091-1/+3
| | | | | | | | | | | | | Tweak the gitarchive exclude handling not to error if excluded files don't match. Also return the tagname created so that other code can then use it. (From OE-Core rev: 2df9c2248ac4996ad1fd1fe9f492eb2d71b758cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1adba3430faffdf6217b6a00533a3b48a9388abc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* resulttool: Use single space indentation in json outputRichard Purdie2024-12-091-1/+1
| | | | | | | | | | | | | Using 4 space indentation in resulted in hundreds of megabytes of extra file size in general use. Reduce this to make filesizes more managable and reduce the processing cost. Some level of indentation and spacing does make the files more readable and allows use of git diff so we need to retain some of it. (From OE-Core rev: cae6106f152c8c44e2d85179ad7e6831b974ffd5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a274cdcaf852cca9497f0358f44dda99c06aacbe) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Clean up pathnamesRichard Purdie2024-12-091-1/+1
| | | | | | | | | | | | | | | | | | | There are several problems with these paths. Firstly they contain full system paths which depend upon where the test was run. These are pretty pointless and just take up a lot of space making the results files large. Secondly, they contain the same path twice. The reference and target path will always be the same thing in two different locations. Strip off the prefix and remove the duplication. This does change the output data but that can't really be avoided. It does shrink the results data and makes it more readable. (From OE-Core rev: 13d844b15deba49a54676fa6f83ab4526ec74b9a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 81a44de36e864b08687451fd85aeba7c529fd7f7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Drop rawlogsRichard Purdie2024-12-091-6/+0
| | | | | | | | | | | | | | | The "rawlogs" data consists of a long string of results data which is already in a structured data format. I can't see this is adding much value in duplciating the data but it does create a huge string with a lot of long problematic pathnames and inflates the results data size. I suggest we drop this data as obsolete and not necessary. (From OE-Core rev: 8e6210530042b722a4f7fea17e5d10cddcd8dfab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5b2c70fab2ffa409b861d83f048b65d458d03a90) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* do_package/sstate/sstatesig: Change timestamp clamping to hash output onlyRichard Purdie2024-12-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was changing the timestamps of the files in the do_package output, particularly the files added for debug sources. This was to do two things: a) make do_package sstate more reproducible b) ensure better hash equivalence matching Unfortuately the debug source files are hardlinks into the source tree for efficiency so touching these, touches a lot of files in ${B} and ${S}. This causes unpredictable effects if compile is run again for example, or could cause compiling in the install task. The hash equivalence matching is of key importance but we can mimic that using clamping of the file timestamps in the depsig output used to generate the hashes. This patch drops the global timestamp clamping, instead allowing the files to retain their creation timestamps into sstate. This makes do_package sstate slightly less reproducibile. We could clamp the sstate timestamps but that would lead to two different sets of timestamps depending on whether the data came from sstate or not. I'd prefer to have consistent code behaviour, rather than differing behavhour depending on whether data came from sstate or not. If we wanted to have reproducibiliy and fix the "corruption" of S/B and have consistent codepaths, the only other option would be two copies of the sources, which could end up huge and seems the least desireable option. This patch therefore drops the timestamp clamping in the sstate files and tweaks the depsig data generation to clamp the timestamps for do_package instead since this seems the best compromise. I validated that rpm/deb/ipk files still generate correctly as before. (From OE-Core rev: 0c93bb692b39af51f0ca109dfd1f949abe7eea9c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 475759fdab7200488b2a568b2ba1aa31a456d113) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* patch.py: Use shlex instead of deprecated pipeOla x Nilsson2024-11-151-6/+5
| | | | | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. Clean up imports while we're at it. (From OE-Core rev: 8eec5c4417301ea3b38e6662e7b29c9071f233e1) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 5f33c7b99a991c380d1813da8248ba5470ca4d4e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/runtime_test/virgl: Disable for all fedoraSteve Sakoman2024-10-121-1/+1
| | | | | | | | | We can't support vgem on RHEL derived distros so disable this test for all fedora hosts rather than specific versions. (From OE-Core rev: c4760d6a52011515b0f931d08f619c7e49e72158) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/oeqa: rename assertRaisesRegexp to assertRaisesRegexRoss Burton2024-09-271-2/+2
| | | | | | | | | | | | TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python 3.2, so rename to fix a warning during test execution. (From OE-Core rev: ff720f337e40761c7d4d544c963cf518ad5403ad) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6df44a4b29487bf8ef51bb5ba6467a4056b749cc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest: skip virgl gtk/sdl test on ubuntu 18.04Steve Sakoman2024-03-121-0/+2
| | | | | | (From OE-Core rev: 20c70400ea7739a20bec174ac5df6841cbf0b4de) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cve_check: cleanup loggingRoss Burton2024-03-071-7/+6
| | | | | | | | | | | | | | Primarily list the number of patches found, useful when debugging. Also clean up some bad escaping that caused warnings and use re.IGNORECASE instead of manually doing case-insenstive rang matches. (From OE-Core rev: 1745208bc08037497ad9de1be15a3cc4a22ceff5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 10acc75b7f3387b968bacd51aade6a8dc11a463f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta/lib/oeqa: python 3.12 regexAdrian Freihofer2024-03-013-5/+5
| | | | | | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 939046c5e9ddd71b941c9e389fa4a4687bfcdec0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 9002850f0c2e409d3bc629e36bb360b96326bb64 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/oelib/buildhistory: git default branchAdrian Freihofer2024-03-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/git/util.py", line 1114, in __getattr__ return list.__getattribute__(self, attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'IterableList' object has no attribute 'master' Support main and master branch for these test cases. Note: setting the default branch with --initial-branch requires git version 2.28 or later. Some of the still supported host distros do not provide this feature yet. (From OE-Core rev: 095598eb7c9aa64797c8a41255fa28b695398054) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 7df99843d8f31d8e0c2872ff625f4a5abf28f740 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: expect meson.bbAdrian Freihofer2024-03-011-2/+2
| | | | | | | | | | | Latest recipetool from master branch generates a pyhton3-meson.bb recipe while the older version from kirkstone generates a meson.bb. Change the test to pass with meson.bb. (From OE-Core rev: 979b216330b2f4e8ab9d4e615d4e83997d59def0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: downgrade meson version to not use pyproject.tomlRoss Burton2024-03-011-13/+16
| | | | | | | | | | | | | | | | | | | recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. (From OE-Core rev: 24bf7bbd1fb21f84539b7a4263d76a33dbacacde) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: fix for python 3.12Adrian Freihofer2024-03-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source/git/mesonbuild/ dependencies.py:777: SyntaxWarning: invalid escape sequence '\.' Use meson 1.3.1 (what is currently also used on master) as a reference for these tests. With this version of meson, recipetool creates recipes named meson_git.bb or meson_1.3.1.bb. Since this looks more reasonable than e.g. python3-meson_git.bb the test gets adapted. (From OE-Core rev: 9c1a1110a317e1d64668badb13e74e474f96a7a9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 7374a8a2810a6cf027bfefefe87691a3529123ff Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa: replace deprecated assertEqualsAdrian Freihofer2024-03-013-3/+3
| | | | | | | | | | | | | | | | assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: a20325690a057aa7f71e5a176bfbdc03baac405c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/runtime_test: only run the virgl tests on qemux86-64Ross Burton2024-02-281-1/+4
| | | | | | | | | | | | These tests should be able to work on qemuarm64, but this is untested and the runners will need configuration. (From OE-Core rev: 16a9037d28303af250bd379de53edb7a00a8ce49) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 09b9558e20e58b473154895b93cff16261c7f561) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* goarch: Move Go architecture mapping to a libraryPeter Marko2023-11-281-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Other spaces uses the Go architecture definitions as their own (for example, container arches are defined to be Go arches). To make it easier for other places to use this mapping, move the code that does the translation of OpenEmbedded arches to Go arches to a library. (From oe-core rev: 3e86f72fc2e1cc2e5ea4b4499722d736941167ce) This commit together with meta-virtualization commit 115f6367f37095415f289fb6981cda9608ac72ff broke meta-virtualization master used with meta-lts-mixins kirkstone/go which is our primary usecase for having kirkstone/go mixin layer Manually crafted since cherry-pick had too many conflicts: * different path to classes * additional architecture loongarch64 * different way how to import library (From OE-Core rev: 8726ae02d760270f9e7fe7ef5715d8f7553371ce) Signed-off-by: Peter Marko <peter.marko@siemens.com> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Cc: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cve-check: don't warn if a patch is remoteRoss Burton2023-11-141-5/+6
| | | | | | | | | | | | | | | | | | We don't make do_cve_check depend on do_unpack because that would be a waste of time 99% of the time. The compromise here is that we can't scan remote patches for issues, but this isn't a problem so downgrade the warning to a note. Also move the check for CVEs in the filename before the local file check so that even with remote patches, we still check for CVE references in the name. (From OE-Core rev: b4e5e02ab5dcc6b32810aa88c371799777dd8821) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0251cad677579f5b4dcc25fa2f8552c6040ac2cf) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cve-check: slightly more verbose warning when adding the same package twiceRoss Burton2023-11-141-1/+1
| | | | | | | | | | | | | Occasionally the cve-check tool will warn that it is adding the same package twice. Knowing what this package is might be the first step towards understanding where this message comes from. (From OE-Core rev: 4b449d5dcbaebb0690a55cf45e3a735c2d8df101) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c1179faec8583a8b7df192cf1cbf221f0e3001fc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "oeqa/utils/gitarchive: fix tag computation when creating archive"Steve Sakoman2023-09-241-4/+2
| | | | | | | | | | This reverts commit d0f8d5915a9ad3340a553b4a22f91074d7e679c9. This is causing errors with buildperf on the autobuilder. (From OE-Core rev: 87eee047cf77bc3fc2c7d6b2a4f35d2642919111) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/gitarchive: fix tag computation when creating archiveAlexis Lothoré2023-09-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sporadic errors have been observed in autobuilder when trying to store new tests results: error: failed to push some refs to 'push.yoctoproject.org:yocto-testresults' hint: Updates were rejected because the tag already exists in the remote. The new tag name is generated by gitarchive based on known tags from the repository (learnt with git tag). In autobuilder case, this repository is a shallow clone, so git tag only returns most recent tags, which mean we could miss some older tags which exist in remote but not locally. In this case, gitarchive will likely create a tag which already exists in remote, and so will fail to push Fix this tag duplication by using git ls-remote to learn about existing tags instead of git tag. Two places which wrongly read only local tags has been identified in gitarchive: expand_tag_strings and get_test_runs Fixes [YOCTO #15140] (From OE-Core rev: d0f8d5915a9ad3340a553b4a22f91074d7e679c9) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5a0a7da85a3acfd4a20a07478eabefdab60f313a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/ssh: Further improve process exit handlingRichard Purdie2023-08-261-2/+3
| | | | | | | | | | | | | | | | It looks like there were further cases where orphaned processes may be left behind since the .kill() calls may be unsuccessful if the process terminated due to the terminate or through normal exit. In that situation .wait() wouldn't have been called. Further tweak the exit code paths to ensure .wait() is called to update the returncode value before returning in all cases. (From OE-Core rev: e1e038ab01a599fcdd4aa6211b6d15cd01a5e2e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0a0a1731e38edfa72a141e8fd8f2de52be562e94) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* target/ssh: Ensure exit code set for commandsRichard Purdie2023-08-261-0/+3
| | | | | | | | | | | | | | As spotted by Joshua Watt, the returncode isn't set until .poll() or .wait() is called so we need to call this after the .kill() call. This fixes return code reporting so that timeouts for example now return an exit code when they didn't before. (From OE-Core rev: c70b05ea667e7bd280470b0b6ca10efb0f648e0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3924e94214b5135369be2551d54fb92097d35e95) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ltp: Increase ltp test output timeoutRichard Purdie2023-08-261-1/+1
| | | | | | | | | | | | On our slower arm server, the tests currently timeout leading to inconsistent test results. Increase the timeout to avoid this and aim to make the test results consistent. (From OE-Core rev: b161af52b9454e07435dc9737b0a2522295f3e4d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9a8b49208f3c99e184eab426360b137bc773aa31) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/target/ssh: Ensure EAGAIN doesn't truncate outputRichard Purdie2023-08-261-0/+3
| | | | | | | | | | | | We have a suspicion that the read() call may return EAGAIN on the non-blocking fd and this may truncate test output leading to some of our intermittent failures. Tweak the code to avoid this potential issue. (From OE-Core rev: 4c02f7407d7afaefe1bc72aea25087b3f2271ac2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: switch to using NFS over TCPAnuj Mittal2023-08-261-2/+2
| | | | | | | | | | | | | This provides a more reliable test execution when running tests that write a large buffer/file and significantly reduces the localedata test failures. (From OE-Core rev: 8d0c669d3d04cf5bc645978afb22ba6c3f3d53e6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 97a7612e3959bc9c75116a4e696f47cc31aea75d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/nfs: allow requesting non-udp portsAnuj Mittal2023-08-261-2/+2
| | | | | | | | | | | Allows setting up NFS over TCP as well. (From OE-Core rev: 2727a0cb8d026e0c47aedd91f7c02e24b056f37b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1ff9b9a3b7f7924aea67d2024581bea2e916036) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: increase the memory for testingAnuj Mittal2023-08-261-1/+1
| | | | | | | | | | | | Some of the tests trigger OOM and fail. Increase the amount of memory available so we dont run into these issues. (From OE-Core rev: 060030ac9d00bf22ae3a2695d7ea060f0f69dfa8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d22dba482cb19ffcff5abee73f24526ea9d1c2a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rpm: Pick debugfs package db files/dirs explicitlyAlex Kiernan2023-08-261-1/+1
| | | | | | | | | | | | Rather than copying the entire /etc hierarchy, specify the pieces we actually need. (From OE-Core rev: 007a57ce36a06f9a78675563020f24e1afa3caa1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit f0fea55ab02b013484282177a636795a254e7986) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs: Add debugfs package db file copy and cleanupAlex Kiernan2023-08-261-6/+14
| | | | | | | | | | | | | | | | | | When copying the package database files for the debugfs, add individual file copy as well as tree copying. After the debug rootfs has been created, cleanup the package files. This then allows us to avoid a problem where (for rpm at least) extraneous files in the debug rootfs would cause failures during oe-selftest because some files existed in both regular and debugfs images. (From OE-Core rev: 96c79c54f282497eb1521b1d5da648ae83fcfe8b) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit ce49ea435ce55eb5b6da442c12e03a806534c38d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: fix the override syntaxAnuj Mittal2023-08-261-1/+1
| | | | | | | | | | | Fix the override so we actually pass the correct value to glibc. (From OE-Core rev: 60ca407ce3113d8b507aaa0876b28902aab7ed5b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 38fd2120f0f48512091ddad6205ce19839eaf589) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/package_manager: Improve repo artefact filteringRichard Purdie2023-08-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | If you run an arm build followed by an x86 one and then ask for a full repo to be created, it will include all of the arm and x86 packages. testexport will then find the arm socat package rather than the x86 one and try and run arm binaries within an x86 qemu image with no success. The reproducer for this was: oe-selftest -r fitimage.FitImageTests.test_initramfs_bundle runtime_test.TestImage.test_testimage_install This patch only symlinks in the compatible package archictures rather than all of them which fixes the failure and the resulting autobuilder intermittent failure too. [YOCTO #15190] (From OE-Core rev: b811ce9e1c94532d49db54d4c3458cd804d96adb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 30b45bcf49bf8207fd96bb45a55d7708661f3359) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/devtool: add unit test for "devtool add -b"Yoann Congal2023-08-021-0/+32
| | | | | | | | | | | | Fix [Yocto #15085] Co-authored-by: Fawzi KHABER <fawzi.khaber@smile.fr> (From OE-Core rev: ea1592b49c6b45495fe9243339fc4dc9cea9ef12) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d5eedf8ca689ccb433c2f5d0b324378f966dd627) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/cases/rpm: fix wait_for_no_process_for_user failure caseRoss Burton2023-08-021-2/+2
| | | | | | | | | | | | | | str.format() doesn't use % notation, update the formatting to work. assertTrue() is a member of self not a global, and assertTrue(True) will always pass. Change this to just self.fail() as this is the failure case. (From OE-Core rev: 05c8af81438d43fd83495cb165c75f43778fea41) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 017f3a0b1265c1a3b69c20bdb56bbf446111977e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* sdk.py: fix moving dnf contentsChen Qi2023-07-211-1/+2
| | | | | | | | | | | | The dnf contents should be moved to <host_sysroot>/etc/dnf/xxx instead of just <host_sysroot>/etc. (From OE-Core rev: 006ff31ddad4c53c63adf1dacecbf2783404a546) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 74b78d160a985e98f869c777847ab798e419dd2d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* sdk.py: error out when moving file failsChen Qi2023-07-211-1/+1
| | | | | | | | | | | | Instead of printing an error message and continuing, we should just error out when moving file fails. (From OE-Core rev: 4ed94fef70df05c874cf0c68dcc95c5636687825) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 12aecd9da94b5f27041982c661e8bab316d365d4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Allow chose the package managerJose Quaresma2023-07-211-1/+5
| | | | | | | | | | | | This is a follow-up of 76e5fcb2 that also allow users to chose the package manager using OEQA_REPRODUCIBLE_TEST_PACKAGE (From OE-Core rev: 4402b746f49611abe71719dd1d174de79bb030bb) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3d414d85b44077bac57aba36707b0fc699a73e97) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest reproducible.py: support different build targetsMikko Rapeli2023-07-211-2/+6
| | | | | | | | | | | | | | | | | | Allow users to set different build reproducibility targets than the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. Fixing all issues from "world" builds is not possible in some complex build environments with lots of layers. Limiting the focus to a smaller subset allows using this test to detect and fix build reproduction issues incrementally. (From OE-Core rev: 3b82a7d74995c0670a6914c58b3d7c42327b8ee9) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit c66bebbce5995e386a1a4d055a914a39b6ee518d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/bbtests: add non-existent prefile/postfile testsFabien Mahot2023-07-121-0/+8
| | | | | | | | | | | | Fixes [YOCTO #10725] (From OE-Core rev: ef732d6dd735ad06c229eb4e2a4aca295490ec53) Signed-off-by: Fabien Mahot <fabien.mahot@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b0c33655fad5b2e7d96a45b6210527dfb766797b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta: lib: oe: npm_registry: Add more safe caractersBELOUARGA Mohamed2023-07-121-1/+1
| | | | | | | | | | | | NPM registry cache should support caracaters like '(' and ')' Explanation: NPM packages can contains these caracters like : @(._.)/execute (From OE-Core rev: d3c1638077d4acbd61e7770c8e1d299ea33df638) Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 6110d9e24e43e286781afd1b3634a4ad1a2050d0) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/terminal.py: Add urxvt terminalPavel Zhukov2023-06-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color [1] WARNING: Terminal screen is supported but did not start ERROR: No valid terminal found, unable to open devshell. Tried the following commands: tmux split-window -c "{cwd}" "do_terminal" tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal" xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal" terminology -T="zephyr-helloworld Configuration" -e do_terminal mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal xterm -T "zephyr-helloworld Configuration" -e do_terminal rxvt -T "zephyr-helloworld Configuration" -e do_terminal tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal" screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal DEBUG: Python function do_menuconfig finished (From OE-Core rev: 59f1a1b2326e2191aa882cfc73a851ea79672a6f) Signed-off-by: Pavel Zhukov <pazhukov@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8d2fe4df8ae33e033caf4119a76715f085be1d15) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/cases/devtool.py: skip all tests require folder a git repoThomas Roos2023-06-231-0/+8
| | | | | | | | | | | | | | | Devtool selftests require poky dir a git repo, when downloading poky as a tar, this is not the case. Those tests will now skipped. [YOCTO #12389] (From OE-Core rev: 9ce30faa488ea905292b9944fb3c1b471019f28c) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 95a5bc130dc51ea9de95c64dbf0e9c7892415d50) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "ipk: Decode byte data to string in manifest handling"Andrew Jeffery2023-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | cf9df9e8d89f ("ipk: Decode byte data to string in manifest handling") did a bit of least-effort fix to a string vs byte sequence issue in the manifest handling. The approach was chosen as it localised the fix, rather than having to analyse further call sites. However since then f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") was applied, reworking the output handling from the subcommand. dummy_bytes() now returns a string, so stop trying to decode it. Fixes: f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") Cc: Curtis Meier <cmeier@us.ibm.com> Cc: Pam Eggler <eggler@us.ibm.com> (From OE-Core rev: b61739554780d70307d2b6b37d2b3b1c7df93c77) (From OE-Core rev: 0e17a5a4f0e3301bf78f77bb5ca4aaf3e4dbc7af) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 07e5a6331be60d5e35d7336a6215a972ced6eb57) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Allow native/cross reuse in testRichard Purdie2023-06-141-2/+2
| | | | | | | | | | | | | | We don't compare reproducibility of the native/cross components, only the target ones. With the long build times of rust-native, the test now takes crazy lengths of time so this tweak should allow us to reuse native/cross artefacts from sstate whilst still testing the target output is reproducible. (From OE-Core rev: 18a9596ae711ba37ac7e44e46744298ba79ae320) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b494d83c639a877cefeb7cbab6d37195e492f059) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package_manager/ipk: fix config path generation in _create_custom_config()Enrico Jörns2023-05-301-1/+1
| | | | | | | | | | | | | | | | "sysconfdir" contains "/" by definition and thus using os.path.join() leads to self.target_rootfs being always ignored (and thus attempting to generate paths in host's /etc). Use oe.path.join() instead which was made for this purpose. (From OE-Core rev: 4766ba017b7562e42b33fde7f2e84c2a339e3f4c) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8414c504138f6de663f5130c6b4a6ede5605d88b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/metadata.py: Fix running oe-selftest running with no distro setThomas Roos2023-05-121-3/+3
| | | | | | | | | | | | | This will use default values when no distribution is set. [YOCTO #15086] (From OE-Core rev: 01eb8d4ad71c587d56608d83ec4187375b2f4c44) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 888fe63b46efceeff08dbe8c4f66fec33d06cb7a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest: devtool: set BB_HASHSERVE_UPSTREAM when setting SSTATE_MIRRORMartin Jansa2023-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * with my build/conf/local.conf: SSTATE_DIR = "/OE/build/poky/build/sstate-cache" these devtool tests will first set own SSTATE_DIR and the original one set as SSTATE_MIRROR: 2023-03-11 11:51:46,837 - oe-selftest - INFO - test_devtool_update_recipe_append (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append) 2023-03-11 11:51:46,846 - oe-selftest - DEBUG - Appending to: /OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/conf/selftest.inc SSTATE_DIR = "/OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/sstate_devtool" SSTATE_MIRRORS += "file://.* file:////OE/build/poky/build/sstate-cache/PATH" * but that unfortunately leads to a warning from sanity.bbclass about SSTATE_MIRRORS without matching BB_HASHSERVE, because BB_HASHSERVE is set to "auto" by default these tests failing with: 2023-03-11 11:55:39,610 - oe-selftest - INFO - ====================================================================== 2023-03-11 11:55:39,610 - oe-selftest - INFO - FAIL: test_devtool_update_recipe_append_git (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append_git) 2023-03-11 11:55:39,610 - oe-selftest - INFO - ---------------------------------------------------------------------- 2023-03-11 11:55:39,611 - oe-selftest - INFO - Traceback (most recent call last): File "/OE/build/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 1118, in test_devtool_update_recipe_append_git self.assertNotIn('WARNING:', result.output) AssertionError: 'WARNING:' unexpectedly found in 'NOTE: Starting bitbake server...\nWARNING: You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.\nLoading cache...done.\nLoaded 0 entries from dependency cache.\nParsing recipes...done.\nParsing of 947 .bb files complete (0 cached, 947 parsed). 1764 targets, 52 skipped, 0 masked, 0 errors.\n\nSummary: There was 1 WARNING message.\nINFO: Updating SRCREV in recipe mtd-utils-selftest_git.bb\nNOTE: Writing append file /tmp/devtoolqa1m2lh02v/layer/recipes-devtools/mtd/mtd-utils-selftest_git.bbappend' ---------------------------------------------------------------------- * just setting BB_HASHSERVE to empty doesn't work, because then we would need to disable OEEquivHash as well as it fails with: ERROR: OEEquivHash requires BB_HASHSERVE to be set (From OE-Core rev: e634a87d2f4f1e57d28c4e7462d56515ed2ea9ef) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 96d4392ee9c5c3674e5c4c4512f527a2ca6765e4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>