aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/freebsd
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@redhat.com>2019-11-14 08:42:46 -0500
committerAlex Bennée <alex.bennee@linaro.org>2019-12-18 20:17:33 +0000
commit1e48931c0c0c29a30342614edb772fad8e4cff98 (patch)
tree726dd0162e1572597dab113386660cd9562ca064 /tests/vm/freebsd
parentafc3a8f9f1df09c091f9903eaef82b35c152cacf (diff)
downloadqemu-1e48931c0c0c29a30342614edb772fad8e4cff98.zip
qemu-1e48931c0c0c29a30342614edb772fad8e4cff98.tar.gz
qemu-1e48931c0c0c29a30342614edb772fad8e4cff98.tar.bz2
tests/vm: Allow to set qemu-img path
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 <wainersm@redhat.com> Message-Id: <20191114134246.12073-2-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests/vm/freebsd')
-rwxr-xr-xtests/vm/freebsd3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index 2a19461..1825cc5 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -82,8 +82,7 @@ class FreeBSDVM(basevm.BaseVM):
self.print_step("Preparing iso and disk image")
subprocess.check_call(["cp", "-f", cimg, iso_xz])
subprocess.check_call(["xz", "-dvf", iso_xz])
- 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 = [