[PATCH v2025.09.y 36/49] test: exit directly when invoking QEMU states on non-QEMU targets
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Dec 19 01:21:12 PST 2025
From: Ahmad Fatoum <a.fatoum at barebox.org>
Instead of running into a lot of later errors, let's just abort
immediately when trying to use --interactive with a target that doesn't
support it.
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
Link: https://lore.barebox.org/20251128105010.2507689-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
(cherry picked from commit 043af2b68ff5d4d821b80a050b9401c1128eb6a9)
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
test/strategy.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/strategy.py b/test/strategy.py
index 11406b97f5f1..a89e79214ba8 100644
--- a/test/strategy.py
+++ b/test/strategy.py
@@ -77,6 +77,9 @@ class BareboxTestStrategy(Strategy):
if state == "qemu_dump_dtb":
self.qemu.machine += f",dumpdtb={self.target.name}.dtb"
+ if self.qemu is None:
+ pytest.exit(f"Can't enter {state} for non-QEMU target")
+
cmd = self.qemu.get_qemu_base_args()
cmd.append("-serial")
--
2.47.3
More information about the barebox
mailing list