mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
3bb4c8b613
commit
37e9b19c34
6 changed files with 41 additions and 30 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue