From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] test: exit directly when invoking QEMU states on non-QEMU targets
Date: Fri, 28 Nov 2025 11:50:06 +0100 [thread overview]
Message-ID: <20251128105010.2507689-1-a.fatoum@pengutronix.de> (raw)
From: Ahmad Fatoum <a.fatoum@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@barebox.org>
---
test/strategy.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/strategy.py b/test/strategy.py
index fc65895daece..fcfa2ed48125 100644
--- a/test/strategy.py
+++ b/test/strategy.py
@@ -93,6 +93,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
next reply other threads:[~2025-11-28 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 10:50 Ahmad Fatoum [this message]
2025-12-01 10:13 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128105010.2507689-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox