summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
AgeCommit message (Collapse)Author
38 hoursimage.bbclass/rootfs: set and unpack package-databaseJohannes Schneider
set the package-database of a "lower image" to unpack and build upon when installing packages for the current image. This way a lean image will be created, which only holds the packages that are not already present in the lower image. An image build such could then be used with overlayfs or systemd- sysext to extend the "lower image" on demand; for development purposes on a device running the "lower image" in RO mode for example. A configuration could look as follows: some-core-image.bb inherit image IMAGE_GEN_PKGDBFS = "1" extending-image.bb inherit image IMAGE_BASE_PKGDB = "some-core-image" Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
38 hoursimage.bbclass/rootfs: archive and deploy package databaseJohannes Schneider
archive the package database after the rootfs has been put together as *rootfs-pkdbfs.tar.gz, and put it into the deploy folder. This creates a snapshot of the package mangers state at the point in time when all dependencies have been resolved and installed; which could be used by "extension images" to built upon. Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
38 hoursbitbake-config-build: add a plugin for config fragmentsAlexander Kanavin
This allows fine-tuning local configurations with pre-frabricated configuration snippets in a structured, controlled way. It's also an important building block for bitbake-setup. There are three operations (list/add/remove), and here's the list output: alex@Zen2:/srv/storage/alex/yocto/build-64$ bitbake-config-build list-fragments NOTE: Starting bitbake server... Available fragments in selftest layer located in /srv/work/alex/poky/meta-selftest: selftest/test-another-fragment This is a second configuration fragment intended for testing in oe-selftest context selftest/test-fragment This is a configuration fragment intended for testing in oe-selftest context The tool requires that each fragment contains a one-line summary at the top, followed by multiple lines of description, as hash-prefixed comments. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
38 hoursbblayers/setupwriters/oe-local-copy: add a 'local copy' plugin for ↵Alexander Kanavin
bitbake-layers create-layer-setup This plugin copies all currently configured layer respositories into a dedicated location on local disk. This is useful for entirely offline layer replication, when the layers are packed and then unpacked from an archive, rather than fetched from git (there can be situations where fetching from git is undesirable or impossible). This plugin will also be used when replicating an entire yocto build (with build config and sstate cache), and is an element of that. This plugin is similar to what esdk does, and it provides that functionality outside of populate_sdk_ext task. It does not reuse esdk code, as that simply copies the layer tree; it's better to use 'git clone' with a path to original repo on local disk, as that will preserve commit history in the copy. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
5 daysselftests: add test_minidebuginfo_qemuEtienne Cordonnier
test_systemd_coredump_minidebuginfo was getting skipped in CI, because the feature isn't enabled per default in any image at the moment. Add this selftest so that test_systemd_coredump_minidebuginfo gets executed in CI. Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 dayspinentry: update 1.2.1 -> 1.3.0Alexander Kanavin
License-update: formatting, FSF address 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>
2024-05-28selftest/rust: correctly form the PATH environment variableAlexander Kanavin
There were two issues here: - the path to native python was not included, so the test suite was running with host python, causing failures due to host python being given native libraries: https://autobuilder.yoctoproject.org/typhoon/#/builders/148/builds/1711/steps/12/logs/stdio (rust recipe uses native python throughout) - tmp/hosttools was listead ahead of native-sysroot/usr/bin 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>
2024-05-28rust: build the default set of toolsAlexander Kanavin
Setting it explicitly replaces rust's default choice which is rustdoc (needed for example in selftests and otherwise expected to be present in typical rust installations): https://github.com/rust-lang/rust/blob/master/config.example.toml#L320 This addresses some of the rust selftest failures but not all. Help is appreciate to restore the selftest. Unfortunately, this also breaks rust reproducibility (or rather exposes that it was never properly fixed, as explained here: https://lists.openembedded.org/g/openembedded-core/message/199288 ) 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>
2024-05-28oeqa/selftest/devtool: add test for modifying recipes using go.bbclassOla x Nilsson
go.bbclass uses a special do_unpack function that causes the git root to be different from S. Verify that it unpacks as expected. [ YOCTO #15483 ] Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28selftest/sstatetests: move exception list for cache objects to the parent classAlexander Kanavin
This is useful not just in cdn/local cache tests, but also in the build bundle test, and so should be applied by default. 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>
2024-05-28selftest/sstatetests: separate sstate presence check into its own classAlexander Kanavin
This allows reusing the check function in tests other than CDN/local mirror ones, such as sstate bundle testing. 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>
2024-05-21recipes: Ensure S is set to a valid directoryRichard Purdie
Several recipes have S pointing at a directory that does not exist. Set S in these cases to somethig valid making the metadata and recipe behaviour more consistent. Tweak one of the QA test diff offsets to match the changed recipe. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21devtool: Drop oe-local-files and simplifyRichard Purdie
The only real reason for oe-local-files was to support S = WORKDIR. With changes to drop support for that, it makes sense to simplify devtool and to try and make both the code and the processes/workflows simpler. This patch drops support for S = WORKDIR, removes oe-local-files and then updates the test cases to match this new situation. At the code level, we assume we can always now track code changes using git and that things committed into git are handled as patches (as before) but delta against HEAD is saved as specific file level changes to the recipe. One test is disabled as it is no longer approproate. It is being keped until we can make WORKDIR != UNPACKDIR at which point it should be revisited. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21recipes: Start WORKDIR -> UNPACKDIR transitionRichard Purdie
Replace references of WORKDIR with UNPACKDIR where it makes sense to do so in preparation for changing the default value of UNPACKDIR. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-17selftest/cases/runtime_test: Exclude centos-9 from virgl testsRichard Purdie
Similarly to centos 8, centos 9 doesn't support the render device we need for this test. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15oeqa/selftest/debuginfod: use localpkgfeed to speed server startupRoss Burton
Sometimes the debuginfod selftest fails due to a timeout, because it spends too long scanning a huge deploy directory that due to what tests were ran previously can contain 30K packages. The test only needs a subset of the feed, so use the new localpkgfeed class to construct a minimal feed before running the test. [ YOCTO #14937 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-09oeqa/selftest/devtool: Fix for usrmerge in DISTRO_FEATURESRichard Purdie
If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would fail. Improve the test so it works in both cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-09oeqa/selftest/recipetool: Fix for usrmerge in DISTRO_FEATURESRichard Purdie
If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would fail. Improve the test so it works in both cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-30Revert "oeqa/selftest/devtool: fix test_devtool_add_git_style2"Alexandre Truong
This reverts commit ab6d3e3d645ffc343f434bf731339fa237df027a from poky repository. The previous reverted commit was a workaround. The fix "oeqa/selftest/devtool: fix _test_devtool_add_git_url" tackle the issue. So, the workaround is not needed anymore. Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-30oeqa/selftest/devtool: fix _test_devtool_add_git_urlAlexandre Truong
This patch is a follow-up to the bug#15466. As a reminder, the bug was about devtool’s submodule detection checking for HEAD when a version is being passed. As Vincent Kriek pointed out: the --version that is being passed to devtool is only used for setting the PV value in the recipe. To take into account the tag, we add --srcrev to the command: devtool add --srcrev v3.1.0 --version v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git;protocol=https Changes to _test_devtool_add_git_url have been made to take into account the srcrev. srcrev will be passed as an optional parameter because the test_devtool_add_git_style1 does not need the srcrev contrary to test_devtool_add_git_style2 Fixes [YOCTO #15466] Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr> Reported-by: Alexandre Truong <alexandre.truong@smile.fr> Suggested-by: Vincent Kriek <vincent@coelebs.dev> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25oeqa/selftest/devtool: add test for updating local files into another layerJulien Stephan
We don't have a test to check if we can correctly devtool update-recipe/finish into another layer. So update the existing test_devtool_update_recipe_local_files to also check the updates into another layer. Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-04-04oeqa/selftest/devtool: fix test_devtool_add_git_style2Alexandre Truong
The problem is the following: AssertionError: 'gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master' != 'git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master' Mbedlts made changes to their repository, adding a sub-module, thus the assert triggers an error with the url: git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master https://github.com/Mbed-TLS/mbedtls/commit/456a54da8ef44c8b725b524567c08cffec6a7214 was the upstream change. To fix the issue, the url has been changed to: gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04oeqa/selftest/overlayfs: test read-only rootfsBaruch Siach
Use the read-only squashfs filesystem to test the read-only case. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-03-31oeqa/sstatetests: Fix race issueRichard Purdie
Under some load conditions, the result event can come back before the command complete event. If that happens, the code would hang indefinitely. Rework the code to wait for both events and avoid the hang. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30selftest/sstatetests: run CDN check twice, ignoring errors the first timeAlexander Kanavin
The current CDN isn't able to serve all objects on first request, and it was suggested to work around that by trying again: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15335#c16 Once CDN moves to a better location this can probably be reverted. [YOCTO #15335] Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07sstatetests.py: Add testing for correct sstate permissionsEilís 'pidge' Ní Fhlannagáin
This patch adds to run_test_sstate_creation so that it also tests that sstate directories don't accidentally pickup umask permissions from the user upon creation. [RP: Python style tweaking] Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-06minicom: upgrade 2.8 -> 2.9Alexander Kanavin
Adjust selftest to git-add the directory with newly added patches, as the new minicom recipe has no default patches, and thus no directory with them (and the selftest assumed it does). Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03oeqa/gotoolchain: set GOPROXYJose Quaresma
Since go-1.21 GOPROXY needs to be set explicitly, otherwise it fails with: - GOPROXY list is not the empty string, but contains no entries This fixes the selftest Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-27oe-selftest devtool: ide-sdk testsAdrian Freihofer
Improve the GDB related tests. Verify GDB finds the correct source files. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24selftest-users: Convoluted selftest for USERADD_DEPENDSEilís 'pidge' Ní Fhlannagáin
This adds a test for 13904's fix by creating a convoluted set of recipes with USERADD_DEPENDS in non-alpha order. Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-23recipetool: Fix errors with meta-poky bbappendRichard Purdie
When a new base-files bbappend was added to meta-poky, it causes selftest failures. Whilst this isn't ideal, workaround that issue for now since the append is being added for security visibility and changing the tests to support this more generically looks invasive. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-23oeqa/selftest/rust: Simplify the rust testsuite output gathering/processingRichard Purdie
The rust testsuite was redirecting command output to a file, which made it hard to debug failure cases since the logs were not available to print to the console. Rework the code so it uses the existing popen logging and hence allows us to improve the error logging situation and make debugging failures easier. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-20recipetool; add support for python_mesonpy classTim Orling
* Add support to detect the "mesonpy" build-backend for recipetool create. * Add oe-selftest case for creating a recipe for "siphash24" from pypi. https://pypi.org/project/siphash24/ This is by far the simplest recipe using the mesonpy build backend. Upstream does not provide LICENSE file(s) and we do not detect the LICENSE so don't check for that result in the test. Likewise, upstream does not define HOMEPAGE, so skip that result. Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-20python: Drop ${PYTHON_PN}Richard Purdie
python 2 is gone and we don't need the abstraction now, drop the remaining usage of this variable. The definition in python3-dir.bbclass is left for now for other layers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19lib/oe/patch: Use git notes to store the filenames for the patchesPeter Kjellerstedt
The old way of keeping track of the filenames for the patches that correspond to the commits was to add a special comment line to the end of the commit message, e.g., "%% original patch: <filename>", using a temporary git hook. This method had some drawbacks, e.g.: * It caused problems if one wanted to push the commits upstream as the comment line had to be manually removed. * The comment line would end up in patches if someone used git format-path rather than devtool finish to generate the patches. * The comment line could interfere with global Git hooks used to validate the format of the Git commit message. * When regenerating patches with `devtool finish --force-patch-refresh`, the process typically resulted in adding empty lines to the end of the commit messages in the updated patches. A better way of keeping track of the patch filenames is to use Git notes. This way the commit messages remain unaffected, but the information is still shown when, e.g., doing `git log`. A special Git notes space, refs/notes/devtool, is used to not intefere with the default Git notes. It is configured to be shown in, e.g., `git log` and to survive rewrites (i.e., `git commit --amend` and `git rebase`). Since there is no longer any need for a temporary Git hook, the code that manipulated the .git/hooks directory has also been removed. To avoid potential problems due to global Git hooks, --no-verify was added to the `git commit` command. To not cause troubles for those who have done `devtool modify` for a recipe with the old solution and then do `devtool finish` with the new solution, the code will fall back to look for the old strings in the commit message if no Git note can be found. While not technically motivated like above, the way to keep track of ignored commits is also changed to use Git notes to avoid having different methods to store similar information. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19lib/oe/patch: Make extractPatches() not extract ignored commitsPeter Kjellerstedt
If a commit is marked with "%% ignore" it means it is used by devtool to keep track of changes to the source code that are not the result of running do_patch(). These changes need to actually be ignored when extracting the patches as they typically make no sense as actual patches in a recipe. This also adds a new test for oe-selftest that verifies that there are no patches generated from ignored commits. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19bitbake-layers: Add test case layers setup for custom referencesJermain Horsman
This includes a simple test which creates a layer setup using custom references, and subsequently modifies the resulting layers setup using a different custom reference. Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-02-19oe-setup-build: add a tool for discovering config templates and setting up ↵Alexander Kanavin
builds This is another piece of the puzzle in setting up builds from nothing without having to write custom scripts or use external tools. After layers have been fetched and placed into their respective locations by oe-setup-layers, one would surely want to proceed to the actual build, and here's how: 1. Without arguments the tool reads available layers from .oe-layers.json file (written out by oe-setup-layers or a fallback under scripts/), prints what templates it has found, and asks the user to select one, as seen below. This will land the user in a shell ready to run bitbake: ============================================= alex@Zen2:/srv/work/alex$ ./setup-build Available build configurations: 1. alex-configuration-gadget This configuration will set up a build for the purposes of supporting gadget. 2. alex-configuration-gizmo This configuration allows building a gizmo. 3. poky-default This is the default build configuration for the Poky reference distribution. Re-run with 'list -v' to see additional information. Please choose a configuration by its number: 1 Running: TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/configuration-gadget . /srv/work/alex/poky/oe-init-build-env /srv/work/alex/build-alex-configuration-gadget && /bin/bash You had no conf/local.conf file. This configuration file has therefore been created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/local.conf.sample You may wish to edit it to, for example, select a different MACHINE (target hardware). You had no conf/bblayers.conf file. This configuration file has therefore been created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/bblayers.conf.sample To add additional metadata layers into your configuration please add entries to conf/bblayers.conf. The Yocto Project has extensive documentation about OE including a reference manual which can be found at: https://docs.yoctoproject.org For more information about OpenEmbedded see the website: https://www.openembedded.org/ This configuration will set up a build for the purposes of supporting gadget. Please refer to meta-alex/README for additional details and available bitbake targets. ============================================== 2. It is also possible to list available configurations without selecting one using 'setup-build list' or to select and setup one non-interactively with 'setup-build setup'. 3. The full set of command line options is: $ ./setup-build --help usage: setup-build [-h] [--layerlist LAYERLIST] {list,setup} ... A script that discovers available build configurations and sets up a build environment based on one of them. Run without arguments to choose one interactively. positional arguments: {list,setup} list List available configurations setup Set up a build environment and open a shell session with it, ready to run builds. optional arguments: -h, --help show this help message and exit --layerlist LAYERLIST Where to look for available layers (as written out by setup-layers script) (default is /srv/work/alex/.oe-layers.json). $ ./setup-build list --help usage: setup-build list [-h] [-v] optional arguments: -h, --help show this help message and exit -v Print detailed information and usage notes for each available build configuration. $ ./setup-build setup --help usage: setup-build setup [-h] [-c configuration_name] [-b build_path] [--no-shell] optional arguments: -h, --help show this help message and exit -c configuration_name Use a build configuration configuration_name to set up a build environment (run this script with 'list' to see what is available) -b build_path Set up a build directory in build_path (run this script with 'list -v' to see where it would be by default) --no-shell Create a build directory but do not start a shell session with the build environment from it. 4. There's an an added hint in oe-setup-layers about how to proceed (as it is really not user-friendly to fetch the layer repos successfully and then exit without a word), and a symlink to the script from the top level layer checkout directory. 5. The selftest to check layer setup has been adjusted to run a basic check for template discovery and build setup. The revision of poky to be cloned has been bumped to 4.1, as that's the first version with a default template in a standard location. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19meta/lib/bblayers/buildconf.py: add support for configuration summariesAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19scripts/oe-setup-layers: write a list of layer paths into the checkout's top dirAlexander Kanavin
This is beneficial for setting up builds, as this list can be used to determine reliably where the actual layers are, and discover available configurations from them. Also adjust the selftest to check the presence of that file rather than any specific layer in a hardcoded location. Sample output (paths are written relative to the file for relocatability and ease of reading): { "layers": [ "meta-openembedded/meta-filesystems", "meta-openembedded/meta-gnome", "meta-openembedded/meta-initramfs", "meta-openembedded/meta-multimedia", "meta-openembedded/meta-networking", "meta-openembedded/meta-oe", "meta-openembedded/meta-perl", "meta-openembedded/meta-python", "meta-openembedded/meta-webserver", "meta-openembedded/meta-xfce", "poky/bitbake/lib/layerindexlib/tests/testdata/layer1", "poky/bitbake/lib/layerindexlib/tests/testdata/layer2", "poky/bitbake/lib/layerindexlib/tests/testdata/layer3", "poky/bitbake/lib/layerindexlib/tests/testdata/layer4", "poky/meta-poky", "poky/meta-selftest", "poky/meta-skeleton", "poky/meta-yocto-bsp", "poky/meta" ], "version": "1.0" } Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-18oeqa/selftest/rust: Exclude failing riscv testsRichard Purdie
The rust tests nearly pass for qemurisv64, add the remaining ones to the exclusion list so it matches everythig else in exlcuding all the know to break cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-18oe-selftest devtool: ide-sdk testsAdrian Freihofer
Add some oe-selftests for the new devtool ide-sdk plugin. Most of the workflows are covered. Many thanks to Enguerrand de Ribaucourt for testing and bug fixing. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-02-13meta/lib/oeqa: python 3.12 regexAdrian Freihofer
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. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13oeqa/selftest/oelib/buildhistory: git default branchAdrian Freihofer
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. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-10oeqa/selftest/recipetool: downgrade meson version to not use pyproject.tomlRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-09selftest/recipetool: Improve test failure outputRichard Purdie
When the test fails, it simply says the file doesn't exist. This isn't helpful so improve the output. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-09selftest/recipetool: Factor tomllib test to a functionRichard Purdie
As more tests start to need this codeblock, factor it into a common function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08oeqa/selftest/recipetool: fix for python 3.12Adrian Freihofer
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. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08oeqa: replace deprecated assertEqualsAdrian Freihofer
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. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08lib/oeqa: rename assertRaisesRegexp to assertRaisesRegexRoss Burton
TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python 3.2, so rename to fix a warning during test execution. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>