summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCleber Rosa2021-02-11 22:55:05 +0100
committerCleber Rosa2021-07-13 19:18:50 +0200
commitb306e26ce0f33ef0a899131c5191b77aaf6df364 (patch)
tree2c4859b40ca7372fba361d6c31a7573affd2d8e1 /tests
parentAcceptance Tests: log information when creating QEMUMachine (diff)
downloadqemu-b306e26ce0f33ef0a899131c5191b77aaf6df364.tar.gz
qemu-b306e26ce0f33ef0a899131c5191b77aaf6df364.tar.xz
qemu-b306e26ce0f33ef0a899131c5191b77aaf6df364.zip
Acceptance Tests: distinguish between temp and logs dir
Logs can be very important to debug issues, and currently QEMUMachine instances will remove logs that are created under the temporary directories. With this change, the stdout and stderr generated by the QEMU process started by QEMUMachine will always be kept along the test results directory. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20210211220146.2525771-6-crosa@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 4ce09de4fa..420c00f1a9 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -222,9 +222,10 @@ class Test(avocado.Test):
def _new_vm(self, name, *args):
self._sd = tempfile.TemporaryDirectory(prefix="avo_qemu_sock_")
vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir,
- sock_dir=self._sd.name)
+ sock_dir=self._sd.name, log_dir=self.logdir)
self.log.debug('QEMUMachine "%s" created', name)
self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir)
+ self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir)
if args:
vm.add_args(*args)
return vm