This logs the command as a single blog with properly escaped line breaks, which allows copy+pasting the command. Helps for manually reproducing a test.
Signed-off-by: Cole Robinson <[email protected]> Acked-by: Luk???? Doktor <[email protected]> --- v2: Rebase, add ldoktor ACK virttest/qemu_vm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py index a35edd2..9cc85db 100644 --- a/virttest/qemu_vm.py +++ b/virttest/qemu_vm.py @@ -1786,9 +1786,8 @@ class VM(virt_vm.BaseVM): "[9p proxy helper]", auto_close=False) - logging.info("Running qemu command (reformatted):") - for item in qemu_command.replace(" -", " \n -").splitlines(): - logging.info("%s", item) + logging.info("Running qemu command (reformatted):\n%s", + qemu_command.replace(" -", " \\\n -")) self.qemu_command = qemu_command self.process = aexpect.run_bg(qemu_command, None, logging.info, "[qemu output] ", -- 1.8.1.4
_______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
