From: Yash Shinde Date: Thu, 11 Dec 2025 14:08:14 +0000 (-0800) Subject: oeqa/selftest/rust: Exclude tier-check and fix openssl-sys build error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b71cb92f368a9bd958518f82646c6f31e5f96039;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest/rust: Exclude tier-check and fix openssl-sys build error - Exclude tier-check which fails due to file not found error. Testing stage2 platform support check (x86_64-poky-linux-gnu) Compiling tier-check v0.1.0 (/srv/pokybuild/yocto-worker/qemux86-64-tc/build/build-st-1400964/tmp/work/x86-64-v3-poky-linux/rust/1.91.1/sources/rustc-1.91.1-src/src/tools/tier-check) thread 'main' (163263) panicked at src/tools/tier-check/src/main.rs:16:10: rustc should run: Os { code: 2, kind: NotFound, message: "No such file or directory" } Reported: https://github.com/rust-lang/rust/issues/149171 - Fix following error by providing openssl in the image: error: failed to run custom build command for `openssl-sys v0.9.109` Failed to find OpenSSL development headers. You can try fixing this setting the `OPENSSL_DIR` environment variable pointing to your OpenSSL installation or installing OpenSSL headers package specific to your distribution. - Exclude "tests/assembly-llvm/c-variadic-arm.rs" failing on arm32. Signed-off-by: Yash Shinde Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 01a98339a6..355d690a59 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): bitbake("{} -c test_compile".format(recipe)) builddir = get_bb_var("RUSTSRC", "rust") # build core-image-minimal with required packages - default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd"] + default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "openssl"] features = [] features.append('IMAGE_FEATURES += "ssh-server-dropbear"') features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages))) @@ -75,9 +75,11 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): 'src/tools/rustdoc-themes', 'src/tools/rust-installer', 'src/tools/test-float-parse', + 'src/tools/tier-check', 'src/tools/suggest-tests', 'src/tools/tidy', 'tests/assembly-llvm/asm/aarch64-outline-atomics.rs', + 'tests/assembly-llvm/c-variadic-arm.rs', 'tests/codegen-llvm/issues/issue-122805.rs', 'tests/codegen-llvm/thread-local.rs', 'tests/mir-opt/', @@ -117,9 +119,11 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): targetsys = get_bb_var("RUST_TARGET_SYS", "rust") rustlibpath = get_bb_var("WORKDIR", "rust") tmpdir = get_bb_var("TMPDIR", "rust") + staging_dir_native = get_bb_var("STAGING_DIR_NATIVE", "core-image-minimal") # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. cmd = "export TARGET_VENDOR=\"-poky\";" + cmd = cmd + " export OPENSSL_DIR=%s/usr;" %(staging_dir_native) cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir) cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath # Strip debug symbols from test binaries to reduce size (300+ MB -> ~140 MB)