From: Deepesh Varatharajan Date: Wed, 21 Jan 2026 07:52:54 +0000 (-0800) Subject: rust: testing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eca50a8bdb2298b432ca295877358716f647732;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git rust: testing Signed-off-by: Deepesh Varatharajan --- diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 3a413911012..248df7f8a9b 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -100,18 +100,18 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): exclude_fail_tests = " ".join([" --exclude " + item for item in exclude_list]) # Add exclude_fail_tests with other test arguments - testargs = exclude_fail_tests + " --no-doc --no-fail-fast --bless" + testargs = exclude_fail_tests + " --no-doc" # wrap the execution with a qemu instance. # Set QEMU RAM to 1024MB to support running unit tests for the compiler crate, including larger # test cases and parallel execution in the test environment. - with runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 1024") as qemu: + with runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 4096") as qemu: # Copy remote-test-server to image through scp host_sys = get_bb_var("RUST_BUILD_SYS", "rust") ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user="root") ssh.copy_to(builddir + "/build/" + host_sys + "/stage2-tools-bin/remote-test-server","~/") # Execute remote-test-server on image through background ssh - command = '~/remote-test-server --bind 0.0.0.0:12345 -v' + command = '~/remote-test-server --bind 0.0.0.0:12345 -vv' sshrun=subprocess.Popen(("ssh", '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-f', "root@%s" % qemu.ip, command), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # Get the values of variables. tcpath = get_bb_var("TARGET_SYS", "rust") diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 1eecba117a5..a12b7b27838 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -4,7 +4,6 @@ SRC_URI += "https://static.rust-lang.org/dist/2026-01-19/rustc-nightly-src.tar.x file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${RUSTSRC} \ file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \ - file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \ file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \ file://disable-rustfmt-check.patch;patchdir=${RUSTSRC} \ file://revert-destabilise-target-spec-json.patch;patchdir=${RUSTSRC} \ diff --git a/scripts/rust-nightly b/scripts/rust-nightly index 6d7feeff3fe..5f01e6a0121 100755 --- a/scripts/rust-nightly +++ b/scripts/rust-nightly @@ -185,17 +185,38 @@ if update_rust_url_and_sha256("../openembedded-core/meta/recipes-devtools/rust/r print("Full bitbake rust task completed successfully.") # Build for additional machines - switch_machine_and_build("qemuarm") - switch_machine_and_build("qemuriscv64") + #switch_machine_and_build("qemuarm") + #switch_machine_and_build("qemuriscv64") # Restore original MACHINE - switch_machine_and_build("qemux86-64") + #switch_machine_and_build("qemux86-64") # Insert SANITY_TESTED_DISTROS insert_sanity_tested_distro("conf/local.conf") + print("Running oe-selftest -r rust and saving output to oe-selftest.log ...") + + with open("oe-selftest.log", "w") as selftest_log: + process = subprocess.Popen( + ["bash", "-c", "oe-selftest -r rust | tee -a oe-selftest.log"], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, + bufsize=1, + ) + for line in process.stdout: + print(line, end="") + selftest_log.write(line) + process.wait() + + #if process.returncode == 0: + # print("oe-selftest passed. Cleaning up...") + # subprocess.run(["rm", "-rf", "../*-st"]) + #else: + # print("oe-selftest failed. Logs saved in oe-selftest.log") + # Run selftest - run_oe_selftest_in_screen() + #run_oe_selftest_in_screen() else: print("Full bitbake rust task failed, check rust.log for details.") else: