]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust: testing
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Wed, 21 Jan 2026 07:52:54 +0000 (23:52 -0800)
committerDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Tue, 27 Jan 2026 05:56:56 +0000 (21:56 -0800)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
meta/lib/oeqa/selftest/cases/rust.py
meta/recipes-devtools/rust/rust-source.inc
scripts/rust-nightly

index 3a41391101275ac3060ca8f5571c0139c9c29c2a..248df7f8a9bc6510d4b91cb11a2640f1b5dc9368 100644 (file)
@@ -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")
index 1eecba117a5821b79d812f44b1489c43da0fbb46..a12b7b278387011cc06b19266357e28fcdee5cc3 100644 (file)
@@ -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} \
index 6d7feeff3fe914db9ab7aa8da1554c463e289759..5f01e6a0121098031f062d0f5f991f3a72ee8176 100755 (executable)
@@ -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: