[PATCH 6/7] test: conftest: add qemu feature

Ahmad Fatoum a.fatoum at barebox.org
Mon Apr 13 00:44:49 PDT 2026


This will allow skipping tests that explicitly require qemu features,
like the incoming screendump in the grpahical tests.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 conftest.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/conftest.py b/conftest.py
index d02e5aff998f..72d2df792e6d 100644
--- a/conftest.py
+++ b/conftest.py
@@ -168,8 +168,9 @@ def strategy(request, target, pytestconfig):  # noqa: max-complexity=30
     try:
         main = target.env.config.data["targets"]["main"]
         qemu_bin = main["drivers"]["QEMUDriver"]["qemu_bin"]
+        features.append("qemu")
     except KeyError:
-        qemu_bin = None
+        pass
 
     virtio = None
 
@@ -202,7 +203,7 @@ def strategy(request, target, pytestconfig):  # noqa: max-complexity=30
         else:
             pytest.exit("barebox currently supports only a single extra virtio console\n", 1)
 
-    if qemu_bin is not None:
+    if "qemu" in features:
         if not pytestconfig.option.qemu_graphics:
             graphics = '-nographic'
         elif qemu_bin == "qemu-system-x86_64":
-- 
2.47.3




More information about the barebox mailing list