summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/sdk/autotools: verify that configure is using the correct hostRoss Burton2025-05-121-0/+6
| | | | | | | | | | Search config.log for the correct host_alias assignment to verify that configure has correctly identified the host system. (From OE-Core rev: ade66073a1c89918f849eb2932c05342e8f3ab4f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/maturin: no need for a setupClass, merge code into testRoss Burton2025-05-121-14/+11
| | | | | | | | | | There's no need to copy files inside setUpClass() when there's only one test function that uses it. Just do all of the test inside the test. (From OE-Core rev: 5474677b21f2f4069f355abdc600483c42d0b0b3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/maturin: be less picky in the list_python testRoss Burton2025-05-121-10/+8
| | | | | | | | | | | | | | | | | | The test assumed that maturin would only find a single Python binary, in /usr/bin/python3*. However in eSDKs with buildtools a Python is shipped with the SDK, so the test failed. Generalise the test so that it runs python3 and obtains its path and version, and then verifies that path and and version are found by Maturin. This means we're not assuming a single Python, or the paths, or that the Python is CPython. (From OE-Core rev: ae9b5dae77ef140422fcf71d239ca028c9208447) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/meson: add check that meson has detected the target correctlyRoss Burton2025-05-121-0/+9
| | | | | | | | | | | Use 'meson introspect' to dump JSON describing the build configuration and validate that the target architectures and cross-compiler is correctly set. (From OE-Core rev: 1c84361829921e91d782b189e2bde818a2d1491c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/gtk3: build libhandy instead of galculatorRoss Burton2025-05-121-26/+20
| | | | | | | | | | | | | | | | galculator hasn't been touched for a decade now[1] and fails to compile under GCC 15. Switch to building libhandy, which is the GTK+3 precursor to libadwaita in the Gnome stack. Whilst this is in low-maintainence mode, will be updated if it breaks. [1] https://github.com/galculator/galculator/ (From OE-Core rev: ff6fa71eb0511d8594c4416a37d75a85470ff9c6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/meson: generalise test caseRoss Burton2025-05-121-17/+34
| | | | | | | | | | | | | | Refactor this test case so the generic "build a meson project" code is separated out and can be reused. Also currently meson inside eSDKs only works with fully populated eSDKs, but our testing uses minimal eSDKS, so skip the test if the eSDK is a minimal build. A bug has been filed to resolve this. (From OE-Core rev: 575e0bf52db0467d88af4b5fe467b682f10ca62a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/kmod: skip test in eSDKsRoss Burton2025-05-121-0/+4
| | | | | | | | | | | At the moment we can't run this test inside an eSDK as it needs the kernel-devsrc recipe to be present. Skip the test until this has been resolved. (From OE-Core rev: f83beee6e63d25ef2b17618a85f9ad6ca0898600) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: use ensure_*_package helpersRoss Burton2025-05-127-38/+11
| | | | | | | | | | | | Clean up lots of dependency checking code by using the new helpers. This means that a lot of tests that were previously skipped inside the eSDK testing on the autobuilder are now executed, and fail. (From OE-Core rev: 11277efd057685558a744e98082b5709e849dd2a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add helpers to check for and install packagesRoss Burton2025-05-121-0/+58
| | | | | | | | | | | | | | | | | | The existing tests simply look at the manifest to determine if a test should be ran or not based on dependencies. Whilst this works for Traditional SDKs, it fails for Extensible SDKs if they've been built in minimal mode, where the manifest will be empty. However, minimal eSDKs might well have available sstate to install the missing dependencies. Add a pair of helper functions to ensure that a package is available, or skip the test. This handles nativesdk- vs -native (SDK vs eSDK) and will try to sdk-install missing dependencies into an eSDK if they're not already installed. (From OE-Core rev: d0e8b83d05957b1f22d08582e364afa4b522801e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add simple test that the manifests are not emptyRoss Burton2025-05-121-0/+26
| | | | | | | | | | | | | Simple test to sanity check that the generated SDK manifest was parsed correctly and isn't empty. This test is complicated by the fact that minimal eSDKs without a toolchain do in fact have an empty manifest, so also check for that. (From OE-Core rev: 43288b19e93f0c07b347d6e5d6f7f10e96219f96) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: fix multilib handling bug in hasTargetPackageRoss Burton2025-05-121-1/+1
| | | | | | | | | | | | | | | | | | hasTargetPackage has some logic to automatically multilibify package names if needed (for example, so that gtk+3 becomes lib32-gtk+3). Due to a logic bug if multilib was True but there were no multilibs configured then this prepended "-" to the package name, which won't exist. This resulted in tests being skipped as the dependent packages are not installed. Solve this by only prepending to the package name if requested and if a multilib environment has been detected. (From OE-Core rev: 2abb146dd81f677176923ebb3188f5b7c034ed68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: allow user to specify which tests to runRoss Burton2025-05-121-1/+2
| | | | | | | | | | | | | | Following the usage of TEST_SUITES in testimage, add TESTSDK_SUITES to specify the list of tests to execute. By default the variable is empty, which means to run all discovered tests. This makes it easier to work on a single test without having to run all of the tests. (From OE-Core rev: 28d437c52c77889b2ede0fc2f2d6777c5b0a553d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Build cpio with C17 stdKhem Raj2025-03-241-2/+2
| | | | | | | | | | | | cpio is not yet buildable with C23 standard which is default with GCC 15, therefore ensure to apply needed bandage to keep it compiling in C17 mode even with GCC 15 (From OE-Core rev: 0c637099887f1be421c8e1203f99631a1e040150) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: Improve multilib handlingRichard Purdie2025-02-011-7/+8
| | | | | | | | | | Rather than hiding the multilib logic in the package tests, move the multilib setting to the init function of the class so the logic is clearer. (From OE-Core rev: 7699867c3ce979ab615eb677a417bb5b82faecb7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/rust: Add a crate that needs the target and SDK host toolchainSean Nyekjaer2025-02-011-0/+2
| | | | | | | | | | Expand the QA tests, to test that the target and SDK host toolchains works. (From OE-Core rev: ed915e40d24a0a8b9d78374b297a9cd8090c6f9c) Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: fix for gtk3 test failure during do_testsdkHarish Sadineni2025-02-011-5/+7
| | | | | | | | | | | | | | | The do_testsdk for lib32-core-image-sato aborts with below error: configure: error: Package requirements (gtk+-3.0) were not met: No package 'gtk+-3.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. This causes due to an absolute path name in 'sdk_env', which is now stripped to have only the environment name. (From OE-Core rev: 386e4132a9ced75599d92610cf5c0e8fe907c3b6) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa sdk cases: Skip SDK test cases when TCLIBC is newlibMark Hatle2024-07-266-0/+28
| | | | | | | | | | | Newlib generally requires additional components to function. Skip the cases where newlib is known to not work. (From OE-Core rev: b9934755554e40d9980b90c3d541f4c702203561) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add out-of-tree kernel module building testRoss Burton2024-07-181-0/+41
| | | | | | | | | | | | | | Validate that out-of-tree kernel module building using kernel-devsrc works as expected. This test uses cryptodev-linux as a idiomatic out of tree module. As the latest release doesn't actually build with kernel 6.7+, use the same commit that our recipe uses. (From OE-Core rev: 8a1c1054815ecc0302c62134f293b8e1f959798a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/case: Ensure DL_DIR is populated with artefacts if usedRichard Purdie2024-06-131-3/+6
| | | | | | | | | | | Where we're using DL_DIR in sdk archive to try and cache testing artefacts, copy into the cache so that it gets populated and this doesn't have to be done manually. Currently we're making a lot of repeat requests to github as this wasn't being populated. (From OE-Core rev: a3284958a2cc6c90a5fac26976bddc23f821c972) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: remove unused imports from test casesRoss Burton2024-05-225-5/+2
| | | | | | | | | Remove redundant imports. (From OE-Core rev: b6223259458578d8b967aff11d3263dfed496708) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: rename test casesRoss Burton2024-05-225-7/+7
| | | | | | | | | | | Instead of having a test called eg "assimp", rename it to "cmake" as the point of the test is to verify that CMake works. This should make it clearer what the tests are actually exercising. (From OE-Core rev: ccf7fdc0e5b6df218b319f972cd5ba142c06c243) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/assimp: Upgrade and fix for gcc 14Richard Purdie2024-05-211-4/+4
| | | | | | | | | To enable this test to work with gcc 14, pass the option to make warnings non-fatal. Also upgrade to version 5.4.1 from 5.3.1. (From OE-Core rev: c3df6287ae26dc9d7f11eb7e26fdbcaefe4dfead) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: share get_json_result_dir helperAlexis Lothoré2024-02-271-9/+2
| | | | | | | | | | | | | Multiple places in oeqa need to get the log output path, and redefine a small helper to accomplish this Define this helper in lib/oeqa/utils/__init__.py and import it wherever needed to allow using it. (From OE-Core rev: 01b1a6a5a4e7cede4d23a981b5144ae9c8306274) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: Avoid PATH contaminationRichard Purdie2024-02-181-0/+3
| | | | | | | | | | | | | | | | | | The autobuilder has been seeing increasing numbers of testsdk failures where xz was 'missing': ERROR: core-image-sato-1.0-r0 do_testsdk: Couldn't install the SDK: Error: xz is required for installation of this SDK, please install it first This is probably due to xz and it's libraries not being in the sysroots in a way which works without races. Since the SDK should be using the host, fix this. The eSDK already does this to solve a similar problem so copy the code from there. (From OE-Core rev: 39ac3439dfdf2afa67abed4bd32aeb3c14979ded) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: replace deprecated assertEqualsAdrian Freihofer2024-02-081-1/+1
| | | | | | | | | | | 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: 68286d0b70cf09a0d2950b48945c9192fb8c8769) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildcpio.py: Switch to using cpio-2.15Khem Raj2024-02-081-4/+3
| | | | | | | | | | | | | | | | | This helps in getting it building with newer architectures like riscv32 since it has upgraded gnulib over 2.14 which has the needed fixes. Drop the -fno-common workaround as it is already applied to cpio drop --disable-maintainer-mode Fixes configure: WARNING: unrecognized options: --disable-maintainer-mode (From OE-Core rev: 18d303497089d3a7a893ee0eec5b0f0c78cca06d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk/assimp.py: Fix build on 32bit arches with 64bit time_tKhem Raj2024-02-051-7/+7
| | | | | | | | | | | | | | | | | | | | This testcase does not work properly with 32bit systems as it houses an older version of zlib which needs to be patched to work with 32bit systems with 64bit time_t e.g. mips o32. Apply a needed patch via sed logic to fix this issue. Enable bundled zlib in build, which means we do not require zlib to be available in SDK and it can be built for more variety of images. Upgrade the testcase to use 5.3.1 release of assimp and add cmake option to enable bundled zlib explicitly. (From OE-Core rev: 3c922fb61aa4f3bbb5c4ef35639acdf263c4313c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: add "maturin develop" SDK test caseTim Orling2023-12-171-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'maturin develop' first checks that a virtual environment has been created, which is a good test for our python3 SDK environment ;) Source for guessing-game lifted from https://www.maturin.rs/tutorial The test case is expected to fetch any necessary crates, build a development version of the crate and package it as a wheel Needs at a minimum the following in e.g. local.conf: TOOLCHAIN_HOST_TASK:append = " nativesdk-python3-maturin" SDK_INCLUDE_TOOLCHAIN = '1' SDK_TOOLCHAIN_LANGS += 'rust' The output of 'maturin develop' should be something like: ... 🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8 🐍 Not using a specific python interpreter 📡 Using build options features from pyproject.toml ... Compiling guessing-game v0.1.0 (/path/to/guessing-game) Finished dev [unoptimized + debuginfo] target(s) in 7.14s 📦 Built wheel for abi3 Python ≥ 3.8 to /path/to/tmpdir/guessing_game-0.1.0-cp38-abi3-linux_x86_64.whl 🛠 Installed guessing-game-0.1.0 (From OE-Core rev: 5265dd0b102cd7f3c6bb2ae1b18e9f625b834b39) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: add simple 'maturin' SDK (testsdk) test caseTim Orling2023-12-171-0/+33
| | | | | | | | | | | | | | | | | | | We expect 'maturin' will be used in SDKs, so it makes sense to also test it in the testsdk environment. To run this test case, you can add the following to local.conf: TOOLCHAIN_HOST_TASK:append = " nativesdk-python3-maturin" And then build and test the SDK: bitbake -c populate_sdk core-image-full-cmdline bitbake -c testsdk core-image-full-cmdline You can substitute a different image recipe for "core-image-full-cmdline" (From OE-Core rev: 7ceff48625d01a0e60eb761a9a668d0c942cda89) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/rust: Add build and run test of rust binary with SDK hostSean Nyekjaer2023-10-191-0/+22
| | | | | | | | | | | Add a QA test to the SDK to test that a basic cargo build works for the SDK host. (From OE-Core rev: 7f05760debd3aeb69c3294f3ceb92d4f1aceec1f) Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Use 2.14 release of cpio instead of 2.13Khem Raj2023-09-261-2/+2
| | | | | | | | | 2.13 may not be buildable with latest compilers without patching (From OE-Core rev: 406a33f896accc35a9cb6ab156f1e0f42dda67d8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/assimp: run only when zlib is in the SDKAlexander Kanavin2023-05-051-0/+3
| | | | | | | | | | | | | | Otherwise assimp will silently fall back to a vendored copy of zlib which will fail with -D_TIME_BITS=64 due to https://github.com/madler/zlib/pull/764 This was exposed by multilib mips core-image-minimal SDKs, where the default 64 bit sysroot has zlib, but 32 bit sysroot does not. (From OE-Core rev: c0fb603c9e26e91388320c02842b42cc7b091d6c) 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>
* oeqa/sdk: Improve Meson testTom Hochstein2023-03-061-1/+1
| | | | | | | | | | | | | | | The meson wrapper setup command detection is broken in the case of an implicit setup command with an option with a space-separated argument, but the test was not detecting it since the case was not covered. Add the option `--warnlevel 1` to the meson command line to cover this case. (From OE-Core rev: 54e9ee8a0c6c9fc89cbb743f0e4fc18607d503cf) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: extend rust test to also use a build scriptPeter Bergin2022-09-031-0/+3
| | | | | | | | | | | The test for rust in the SDK is extended with the simplest possible build script. This will make use of the host toolchain for building build.rs before building the rust package for target. (From OE-Core rev: 85a676da586f9b1085e62ef1325c9a58168390ae) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-1215-0/+30
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/rust: Fix file deletion for multilib SDKsRichard Purdie2022-08-011-2/+2
| | | | | | | | | | We need to use shutil.rmtree here since removedirs() only covers directories. Make the exception for specific too to make errors easier to catch. (From OE-Core rev: 9d2a661e46123a2292f7887658e6fa54923dbcc0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto buildsAlexander Kanavin2022-07-282-2/+4
| | | | | | | | | | Other tests already have similar tweaks. (From OE-Core rev: 3134d19ba15bb783389c40617d5e2b568c7cd81c) 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>
* oeqa/sdk: add a test class for running SDK tests directly in a Yocto buildAlexander Kanavin2022-07-281-0/+43
| | | | | | | | | | | This is a simpler version of the same class in testsdk.py, as it does not need to unpack and set up the SDK, and can proceed to the tests straight away. (From OE-Core rev: be21c62e5bd96164aab9e01168b7a43c6de44c17) 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>
* oeqa/sdk: Add basic rust cargo testOtavio Salvador2022-07-283-0/+42
| | | | | | | | | | | Add a QA test to the SDK to test that a basic cargo build works. [RP: Tweaked to work for multilibs and updated to match toolchain changes] (From OE-Core rev: d0cfe587bc897e79ef01805cc9a42fbca28c883c) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: drop the nativesdk-python 2.x testAlexander Kanavin2022-06-251-11/+0
| | | | | | | | | | Python 2.x has been EOL for a while, and so this test never runs. (From OE-Core rev: b687627e9cffb8123c156413f55ea1929f1a7831) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cases/buildepoxy.py: fix typoChen Qi2022-04-261-1/+1
| | | | | | | | (From OE-Core rev: 3a9b6e71d1e7e8e2ebc0ed047841e36f09300387) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildtools-docs-tarball: Add test for building documentation using sphinxRichard Purdie2022-03-182-0/+19
| | | | | | (From OE-Core rev: 26b224a1bbe27b5d9886be4552147e1d66e34519) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildtools: Switch to our webserver instead of example.comRichard Purdie2022-02-121-2/+2
| | | | | | | | | Similarly to the sanity connectivity check, switch away from example.com for the buildtools tests. (From OE-Core rev: ed10f3c2b4c678069fe1cee73f79f6e388c7777e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Update cleanup code to wait for hashserv exitRichard Purdie2021-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We sometimes see exceptions from code seeing the hashserv DB files being removed at directory cleanup time. Add a check to ensure the hashserv has written the data base journal (and hence likely exited) before cleaning up. This will hopefully avoid errors like: Traceback (most recent call last): File "[...]/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 30, in test_libc delay = delay - 1 File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__ self.cleanup() File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup _rmtree(self.name) File "/usr/lib/python3.6/shutil.py", line 486, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.6/shutil.py", line 424, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.6/shutil.py", line 444, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.6/shutil.py", line 442, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal' (From OE-Core rev: 0b07d9add687d78495176cda0f3011c10ffa4d4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildtools-cases: Allow bitbake time to shutdownRichard Purdie2021-09-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | bitbake may still be shutting down when the UI exits. Wait for the lock to disappear before trying to delete the directory to avoid errors. Traceback (most recent call last): File "/home/pokybuild/yocto-worker/buildtools/build/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 23, in test_libc self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir)) File "/usr/lib64/python3.7/tempfile.py", line 807, in __exit__ self.cleanup() File "/usr/lib64/python3.7/tempfile.py", line 811, in cleanup _shutil.rmtree(self.name) File "/usr/lib64/python3.7/shutil.py", line 494, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib64/python3.7/shutil.py", line 452, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib64/python3.7/shutil.py", line 450, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock' (From OE-Core rev: 94df60cc97058444188ec8372c2d9849e74b76c6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add HTTPS test for buildtoolsRoss Burton2021-08-181-0/+20
| | | | | | | | | | Verify that HTTPS connections work in both wget and Python, as this depends on variables correctly pointing to the certificate chain. (From OE-Core rev: 5c2b1fb09e786ec392979d21dc7884ca23cd84f0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add relocation test for buildtoolsRoss Burton2021-08-181-0/+29
| | | | | | | | | | | | The buildtools-extended tarball includes GCC, which relies on being relocated correctly to work. Add a test case that verifies that the loader paths have all been relocated, as otherwise there are hard-to-debug errors at build time. (From OE-Core rev: fe1f675ea156722a3709b13cd751479c9528134d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add some buildtools testsRoss Burton2021-08-123-0/+47
| | | | | | | | | | | | | | | | | These two tests are designed to exercise the buildtools-tarball. SanityTests simply verifies that inside the SDK, some commands are used from the SDK. BuildTests creates a new OE build directory and builds virtual/libc to verify that a basic build works correctly. DL_DIR is reused to avoid needless downloading, but sstate is not shared to ensure a build does happen. (From OE-Core rev: 6157d6ffa32d6df383c29d4b6de07feb9d619913) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: sdk: Capture stderr outputJoshua Watt2020-09-026-6/+6
| | | | | | | | | | | Redirect stderr to stdout when running subcommands while doing the SDK tests. The tests will show stdout when CalledProcessError is raised, but any output to stderr was lost. (From OE-Core rev: 7cb4e9ab8c1596281060e94a216966060103956e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildgalculator: Patch to fix build with -fno-commonKhem Raj2020-08-181-1/+1
| | | | | | | | | | We need to apply a patch to galculator for it to build with gcc-10+ Remove double definition of 'prefs' variable (From OE-Core rev: 93a62e6b35d1a6ed3c678f8e27508dd0cdbdbbe4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>