[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/7] boot_linux.py: Use pick_qemu_util
From: |
Lukas Straub |
Subject: |
[PATCH v2 3/7] boot_linux.py: Use pick_qemu_util |
Date: |
Sat, 6 Jun 2020 21:18:01 +0200 |
Replace duplicate code with pick_qemu_util.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
tests/acceptance/boot_linux.py | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
index 075a386300..6b99112cad 100644
--- a/tests/acceptance/boot_linux.py
+++ b/tests/acceptance/boot_linux.py
@@ -44,15 +44,8 @@ class BootLinux(Test):
def prepare_boot(self):
self.log.debug('Looking for and selecting a qemu-img binary to be '
'used to create the bootable snapshot image')
- # If qemu-img has been built, use it, otherwise the system wide one
- # will be used. If none is available, the test will cancel.
- qemu_img = os.path.join(BUILD_DIR, 'qemu-img')
- if not os.path.exists(qemu_img):
- qemu_img = find_command('qemu-img', False)
- if qemu_img is False:
- self.cancel('Could not find "qemu-img", which is required to '
- 'create the bootable image')
- vmimage.QEMU_IMG = qemu_img
+
+ vmimage.QEMU_IMG = self.pick_qemu_util("qemu-img")
self.log.info('Downloading/preparing boot image')
# Fedora 31 only provides ppc64le images
--
2.20.1
pgpDRx36vl_Ge.pgp
Description: OpenPGP digital signature
- [PATCH v2 0/7] colo: Introduce resource agent and test suite/CI, Lukas Straub, 2020/06/06
- [PATCH v2 1/7] block/quorum.c: stable children names, Lukas Straub, 2020/06/06
- [PATCH v2 2/7] avocado_qemu: Introduce pick_qemu_util to pick qemu utility binaries, Lukas Straub, 2020/06/06
- [PATCH v2 3/7] boot_linux.py: Use pick_qemu_util,
Lukas Straub <=
- [PATCH v2 4/7] colo: Introduce resource agent, Lukas Straub, 2020/06/06
- [PATCH v2 6/7] configure,Makefile: Install colo resource-agent, Lukas Straub, 2020/06/06
- [PATCH v2 5/7] colo: Introduce high-level test suite, Lukas Straub, 2020/06/06
- [PATCH v2 7/7] MAINTAINERS: Add myself as maintainer for COLO resource agent, Lukas Straub, 2020/06/06