From 1e48931c0c0c29a30342614edb772fad8e4cff98 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Thu, 14 Nov 2019 08:42:46 -0500 Subject: tests/vm: Allow to set qemu-img path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default VM build test use qemu-img from system's PATH to create the image disk. Due the lack of qemu-img on the system or the desire to simply use a version built with QEMU, it would be nice to allow one to set its path. So this patch makes that possible by reading the path to qemu-img from QEMU_IMG if set, otherwise it fallback to default behavior. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20191114134246.12073-2-wainersm@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/vm/fedora | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/vm/fedora') diff --git a/tests/vm/fedora b/tests/vm/fedora index 7fec147..8e270fc 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -74,9 +74,7 @@ class FedoraVM(basevm.BaseVM): self.print_step("Preparing iso and disk image") subprocess.check_call(["cp", "-f", cimg, iso]) - subprocess.check_call(["qemu-img", "create", "-f", "qcow2", - img_tmp, self.size]) - + self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size) self.print_step("Booting installer") self.boot(img_tmp, extra_args = [ "-bios", "pc-bios/bios-256k.bin", -- cgit v1.1