python/qemu: split console from harness args

Before we mess with the console output lets create a new helper just
for that.

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260619155657.944220-3-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée
2026-06-19 16:56:51 +01:00
parent 220530755b
commit 1c09090b48

View File

@@ -306,7 +306,11 @@ def _harness_args(self) -> List[str]:
moncdev = f"socket,id=mon,path={self._monitor_address}"
args.extend(['-chardev', moncdev, '-mon',
'chardev=mon,mode=control'])
return args
@property
def _console_args(self) -> List[str]:
args: List[str] = []
for _ in range(self._console_index):
args.extend(['-serial', 'null'])
if self._console_set:
@@ -372,6 +376,7 @@ def _pre_launch(self) -> None:
self._wrapper,
[self._binary],
self._harness_args,
self._console_args,
self._base_args,
self._args
))