[Concept,07/13] ulib: x86: Enable Rust demo for qemu-x86

Message ID 20260220001926.2366140-8-sjg@u-boot.org
State New
Headers
Series ulib: Enable the Rust demo on more architectures |

Commit Message

Simon Glass Feb. 20, 2026, 12:19 a.m. UTC
  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(+)
  

Patch

diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index 2275ff9de1a..5e68c8283ec 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -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
diff --git a/test/py/tests/test_ulib.py b/test/py/tests/test_ulib.py
index 5ca46df0fe8..2090a06efbc 100644
--- a/test/py/tests/test_ulib.py
+++ b/test/py/tests/test_ulib.py
@@ -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")