mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] fixup! test: pytest: have --qemu gobble up all remaining arguments
@ 2023-08-23  6:16 Ahmad Fatoum
  2023-08-23  6:16 ` [PATCH 2/2] test: pytest: support formats besides raw for --blk Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-08-23  6:16 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

test: pytest: fix command line parse error when --qemu is missing

Default is None, which is not suitable for iteration in a for loop. Give
it a default of [] instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 test/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/conftest.py b/test/conftest.py
index 64082869b329..03bf41a93874 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -41,7 +41,7 @@ def pytest_addoption(parser):
     parser.addoption('--blk', action='append', dest='qemu_block',
         default=[], metavar="FILE",
         help=('Pass block device to emulated barebox. Can be specified more than once'))
-    parser.addoption('--qemu', dest='qemu_arg', nargs=argparse.REMAINDER,
+    parser.addoption('--qemu', dest='qemu_arg', nargs=argparse.REMAINDER, default=[],
         help=('Pass all remaining options to QEMU as is'))
 
 @pytest.fixture(scope="session")
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-23  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23  6:16 [PATCH 1/2] fixup! test: pytest: have --qemu gobble up all remaining arguments Ahmad Fatoum
2023-08-23  6:16 ` [PATCH 2/2] test: pytest: support formats besides raw for --blk Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox