[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/39] tests/functional: put QEMUMachine logs in testcase log dir
From: |
Alex Bennée |
Subject: |
[PATCH 09/39] tests/functional: put QEMUMachine logs in testcase log directory |
Date: |
Thu, 21 Nov 2024 16:57:36 +0000 |
From: Daniel P. Berrangé <berrange@redhat.com>
We are not passing the 'log_dir' parameter to QEMUMachine, so the
QEMU stdout/err logs are being placed in a temp directory and thus
deleted after execution. This makes them inaccessible as gitlab
CI artifacts.
Pass the testcase log directory path into QEMUMachine to make the
logs persistent.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20241121154218.1423005-10-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/functional/qemu_test/testcase.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/functional/qemu_test/testcase.py
b/tests/functional/qemu_test/testcase.py
index b9418e2ac0..ca13af244b 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -163,10 +163,11 @@ def require_device(self, devicename):
self.skipTest('no support for device ' + devicename)
def _new_vm(self, name, *args):
- vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir)
+ vm = QEMUMachine(self.qemu_bin,
+ base_temp_dir=self.workdir,
+ 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
--
2.39.5
- [PATCH 03/39] tests/functional: remove "AVOCADO" from env variable name, (continued)
- [PATCH 03/39] tests/functional: remove "AVOCADO" from env variable name, Alex Bennée, 2024/11/21
- [PATCH 02/39] tests/functional: automatically clean up scratch files after tests, Alex Bennée, 2024/11/21
- [PATCH 01/39] tests/functional: fix mips64el test to honour workdir, Alex Bennée, 2024/11/21
- [PATCH 04/39] tests/functional: remove todo wrt avocado.utils.wait_for, Alex Bennée, 2024/11/21
- [PATCH 05/39] tests/functional: remove leftover :avocado: tags, Alex Bennée, 2024/11/21
- [PATCH 07/39] tests/functional: remove comments talking about avocado, Alex Bennée, 2024/11/21
- [PATCH 10/39] tests/functional: honour requested test VM name in QEMUMachine, Alex Bennée, 2024/11/21
- [PATCH 06/39] tests/functional: remove obsolete reference to avocado bug, Alex Bennée, 2024/11/21
- [PATCH 08/39] tests/functional: honour self.workdir in ACPI bits tests, Alex Bennée, 2024/11/21
- [PATCH 09/39] tests/functional: put QEMUMachine logs in testcase log directory,
Alex Bennée <=
- [PATCH 13/39] tests/functional: don't try to wait for the empty string, Alex Bennée, 2024/11/21
- [PATCH 14/39] tests/functional: require non-NULL success_message for console wait, Alex Bennée, 2024/11/21
- [PATCH 11/39] tests/functional: enable debug logging for QEMUMachine, Alex Bennée, 2024/11/21
- [PATCH 16/39] tests/functional: remove time.sleep usage from tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 12/39] tests/functional: logs details of console interaction operations, Alex Bennée, 2024/11/21