[PATCH 1/2] fixup! test: pytest: have --qemu gobble up all remaining arguments
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Aug 22 23:16:11 PDT 2023
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 at 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
More information about the barebox
mailing list