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")
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} \
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: