[Libguestfs] [p2v PATCH] tests: fix run-virt-p2v-in-a-vm helper target

Pino Toscano ptoscano at redhat.com
Fri Sep 27 12:57:49 UTC 2019


It relied on the qemu libguestfs was configured with, which is no more
available now.  Since we already require libguestfs tools for some
functional tests, make run-virt-p2v-in-a-vm depend on libguestfs too,
and use the qemu configured in libguestfs.
---
 Makefile.am | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index d27219d..d1b4bee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -266,8 +266,9 @@ endif HAVE_LIBGUESTFS
 run-virt-p2v-directly: $(PHYSICAL_MACHINE)
 	$(top_builddir)/run virt-p2v --test-disk=$(PHYSICAL_MACHINE)
 
+if HAVE_LIBGUESTFS
 run-virt-p2v-in-a-vm: virt-p2v.img $(PHYSICAL_MACHINE)
-	$(QEMU) \
+	$(shell guestfish get-hv) \
 	  -M pc,accel=kvm:tcg \
 	  -cpu host \
 	  -m 1024 \
@@ -284,6 +285,7 @@ run-virt-p2v-in-a-vm: virt-p2v.img $(PHYSICAL_MACHINE)
 	  -device e1000,netdev=net2 \
 	  $(QEMU_OPTIONS) \
 	  &
+endif HAVE_LIBGUESTFS
 
 run-virt-p2v-non-gui-conversion: stamp-test-virt-p2v-pxe-data-files
 	SLOW=1 $(top_builddir)/run ./test-virt-p2v-pxe.sh
-- 
2.21.0




More information about the Libguestfs mailing list