[Concept,07/13] ulib: x86: Enable Rust demo for qemu-x86
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Enable CONFIG_RUST_EXAMPLES in qemu-x86_defconfig and add a pytest
for the 32-bit Rust demo ROM, using the existing
run_x86_rom_rust_demo() helper with qemu-system-i386.
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
configs/qemu-x86_defconfig | 1 +
test/py/tests/test_ulib.py | 7 +++++++
2 files changed, 8 insertions(+)
@@ -15,6 +15,7 @@ CONFIG_GENERATE_PIRQ_TABLE=y
CONFIG_GENERATE_MP_TABLE=y
CONFIG_ULIB=y
CONFIG_EXAMPLES=y
+CONFIG_RUST_EXAMPLES=y
CONFIG_FIT=y
CONFIG_BOOTSTD_FULL=y
CONFIG_BOOTSTAGE=y
@@ -315,6 +315,13 @@ def run_x86_rom_rust_demo(ubman, qemu_binary):
out = run_qemu_demo(cmd)
assert_demo_output(out)
+@pytest.mark.localqemu
+@pytest.mark.boardspec('qemu-x86')
+@pytest.mark.buildconfigspec("rust_examples")
+def test_ulib_rust_demo_rom(ubman):
+ """Test the Rust ulib demo ROM image under QEMU x86."""
+ run_x86_rom_rust_demo(ubman, 'qemu-system-i386')
+
@pytest.mark.localqemu
@pytest.mark.boardspec('qemu-x86_64_nospl')
@pytest.mark.buildconfigspec("rust_examples")