Commit Graph

115 Commits

Author SHA1 Message Date
Ross Burton
7157ffa551 oeqa/sdk/autotools: verify that configure is using the correct host
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>
2025-05-12 22:01:55 +01:00
Ross Burton
0fc5716c11 oeqa/sdk/maturin: no need for a setupClass, merge code into test
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>
2025-05-12 22:01:55 +01:00
Ross Burton
04e4586c66 oeqa/sdk/maturin: be less picky in the list_python test
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>
2025-05-12 22:01:55 +01:00
Ross Burton
b8009efc19 oeqa/sdk/meson: add check that meson has detected the target correctly
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>
2025-05-12 22:01:55 +01:00
Ross Burton
a916ac3844 oeqa/sdk/gtk3: build libhandy instead of galculator
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>
2025-05-12 22:01:55 +01:00
Ross Burton
fa6d138447 oeqa/sdk/meson: generalise test case
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>
2025-05-12 22:01:55 +01:00
Ross Burton
ff06a1b425 oeqa/sdk/kmod: skip test in eSDKs
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>
2025-05-12 22:01:55 +01:00
Ross Burton
393691faf1 oeqa/sdk: use ensure_*_package helpers
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>
2025-05-12 22:01:55 +01:00
Ross Burton
eeacb5d906 oeqa/sdk: add helpers to check for and install packages
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>
2025-05-12 22:01:55 +01:00
Ross Burton
788ea3f7a1 oeqa/sdk: add simple test that the manifests are not empty
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>
2025-05-12 22:01:55 +01:00
Ross Burton
16ca89f0bb oeqa/sdk/context: fix multilib handling bug in hasTargetPackage
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>
2025-05-12 22:01:55 +01:00
Ross Burton
cabcadd9be testsdk: allow user to specify which tests to run
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>
2025-05-12 22:01:55 +01:00
Khem Raj
b76c04bdcb oeqa: Build cpio with C17 std
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>
2025-03-24 17:29:16 +00:00
Richard Purdie
36f2627b13 oeqa/sdk/context: Improve multilib handling
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>
2025-02-01 13:20:45 +00:00
Sean Nyekjaer
8545e5b458 oeqa/sdk/rust: Add a crate that needs the target and SDK host toolchain
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>
2025-02-01 13:20:45 +00:00
Harish Sadineni
27d7a7540f oeqa/sdk/context: fix for gtk3 test failure during do_testsdk
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>
2025-02-01 13:20:45 +00:00
Mark Hatle
6c56ffc8cf oeqa sdk cases: Skip SDK test cases when TCLIBC is newlib
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>
2024-07-26 12:28:42 +01:00
Ross Burton
e64be51ed5 oeqa/sdk: add out-of-tree kernel module building test
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>
2024-07-18 17:21:39 +01:00
Richard Purdie
4d50069d78 oeqa/sdk/case: Ensure DL_DIR is populated with artefacts if used
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>
2024-06-13 09:11:17 +01:00
Ross Burton
d2e7656f4f oeqa/sdk: remove unused imports from test cases
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>
2024-05-22 10:21:26 +01:00
Ross Burton
fd2714953d oeqa/sdk: rename test cases
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>
2024-05-22 10:21:26 +01:00
Richard Purdie
41eb98ac61 oeqa/sdk/assimp: Upgrade and fix for gcc 14
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>
2024-05-21 12:08:05 +01:00
Alexis Lothoré
fec128bd62 lib/oeqa: share get_json_result_dir helper
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>
2024-02-27 11:35:43 +00:00
Richard Purdie
3c08950557 testsdk: Avoid PATH contamination
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>
2024-02-18 07:34:42 +00:00
Adrian Freihofer
f58aedff02 oeqa: replace deprecated assertEquals
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>
2024-02-08 23:14:51 +00:00
Khem Raj
bd7a3fd0f7 buildcpio.py: Switch to using cpio-2.15
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>
2024-02-08 10:59:06 +00:00
Khem Raj
34abe0219f sdk/assimp.py: Fix build on 32bit arches with 64bit time_t
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>
2024-02-05 14:06:09 +00:00
Tim Orling
7d881f0214 oeqa: add "maturin develop" SDK test case
'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>
2023-12-17 19:07:22 +00:00
Tim Orling
b2b2e02775 oeqa: add simple 'maturin' SDK (testsdk) test case
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>
2023-12-17 19:07:22 +00:00
Sean Nyekjaer
96310a5867 oeqa/sdk/rust: Add build and run test of rust binary with SDK host
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>
2023-10-19 13:38:56 +01:00
Khem Raj
bf7e3886ae oeqa: Use 2.14 release of cpio instead of 2.13
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>
2023-09-26 10:25:42 +01:00
Alexander Kanavin
850b5d5eed oeqa/sdk/assimp: run only when zlib is in the SDK
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>
2023-05-05 11:07:26 +01:00
Tom Hochstein
011cc9a104 oeqa/sdk: Improve Meson test
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>
2023-03-06 09:52:16 +00:00
Peter Bergin
7ef1feefa4 oeqa/sdk: extend rust test to also use a build script
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>
2022-09-03 08:51:57 +01:00
Richard Purdie
ce08cf4825 lib: Add copyright statements to files without one
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>
2022-08-12 12:00:43 +01:00
Richard Purdie
2ef7affa31 oeqa/sdk/rust: Fix file deletion for multilib SDKs
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>
2022-08-01 14:18:16 +01:00
Alexander Kanavin
638f988602 oeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto builds
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>
2022-07-28 11:50:17 +01:00
Alexander Kanavin
3afd79df9e oeqa/sdk: add a test class for running SDK tests directly in a Yocto build
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>
2022-07-28 11:50:17 +01:00
Otavio Salvador
1e3e20e92e oeqa/sdk: Add basic rust cargo test
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>
2022-07-28 11:07:33 +01:00
Alexander Kanavin
f23474acfa oeqa/sdk: drop the nativesdk-python 2.x test
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>
2022-06-25 21:13:40 +01:00
Chen Qi
57627d99bd cases/buildepoxy.py: fix typo
(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>
2022-04-26 18:25:08 +01:00
Richard Purdie
20058345e0 buildtools-docs-tarball: Add test for building documentation using sphinx
(From OE-Core rev: 26b224a1bbe27b5d9886be4552147e1d66e34519)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-18 23:27:28 +00:00
Richard Purdie
81fe3dfab9 oeqa/buildtools: Switch to our webserver instead of example.com
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>
2022-02-12 17:38:07 +00:00
Richard Purdie
f4886717e5 oeqa: Update cleanup code to wait for hashserv exit
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>
2021-10-16 17:41:59 +01:00
Richard Purdie
29fcb0dfc9 oeqa/buildtools-cases: Allow bitbake time to shutdown
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>
2021-09-01 18:48:46 +01:00
Ross Burton
6b19caf208 oeqa/sdk: add HTTPS test for buildtools
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>
2021-08-18 17:01:06 +01:00
Ross Burton
8ab0f43fda oeqa/sdk: add relocation test for buildtools
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>
2021-08-18 17:01:06 +01:00
Ross Burton
262587d754 oeqa/sdk: add some buildtools tests
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>
2021-08-12 06:26:15 +01:00
Joshua Watt
6736b91b2b oeqa: sdk: Capture stderr output
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>
2020-09-02 16:00:46 +01:00
Khem Raj
b230ee4eaf buildgalculator: Patch to fix build with -fno-common
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>
2020-08-18 11:44:55 +01:00