diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2024-12-17 15:59:49 +0000 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-12-17 19:39:53 +0100 |
| commit | 37e9b19c34d9500164e33ccf377e1830e956bca0 (patch) | |
| tree | 4699be481053c51effb54772ffc6d81c965b3234 /tests/functional/test_aarch64_virt.py | |
| parent | 3bb4c8b6134df5367675c4ade4f5c177d29fe903 (diff) | |
| download | focaccia-qemu-37e9b19c34d9500164e33ccf377e1830e956bca0.tar.gz focaccia-qemu-37e9b19c34d9500164e33ccf377e1830e956bca0.zip | |
tests/functional: replace 'run_cmd' with subprocess helpers
The 'run_cmd' helper is re-implementing a convenient helper that already exists in the form of the 'run' and 'check_call' methods provided by 'subprocess'. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20241217155953.3950506-29-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_aarch64_virt.py')
| -rwxr-xr-x | tests/functional/test_aarch64_virt.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_aarch64_virt.py index cc49f8963d..08576b0694 100755 --- a/tests/functional/test_aarch64_virt.py +++ b/tests/functional/test_aarch64_virt.py @@ -12,10 +12,11 @@ import time import logging +from subprocess import check_call, DEVNULL from qemu_test import QemuSystemTest, Asset from qemu_test import exec_command, wait_for_console_pattern -from qemu_test import get_qemu_img, run_cmd +from qemu_test import get_qemu_img class Aarch64VirtMachine(QemuSystemTest): @@ -96,7 +97,8 @@ class Aarch64VirtMachine(QemuSystemTest): logger.info('creating scratch qcow2 image') image_path = self.scratch_file('scratch.qcow2') qemu_img = get_qemu_img(self) - run_cmd([qemu_img, 'create', '-f', 'qcow2', image_path, '8M']) + check_call([qemu_img, 'create', '-f', 'qcow2', image_path, '8M'], + stdout=DEVNULL, stderr=DEVNULL) # Add the device self.vm.add_args('-blockdev', |