summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-13 09:01:53 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-13 15:26:29 +0000
commitc4a3ea066be9823d4572b57fd05940345904b826 (patch)
treec332207dd24fb1c269035dc95e2156630a34e436
parent765d14dc0551b2c05d6a846aa6701055b080180c (diff)
downloadlibguestfs-c4a3ea066be9823d4572b57fd05940345904b826.tar.gz
libguestfs-c4a3ea066be9823d4572b57fd05940345904b826.tar.xz
libguestfs-c4a3ea066be9823d4572b57fd05940345904b826.zip
extra-tests: Add $(libvirt_ro_uri) substitution to configure.
This is essentially just code motion.
-rw-r--r--configure.ac3
-rw-r--r--tests/extra/Makefile.am20
2 files changed, 12 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 0d582faa..4d6083d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,6 +708,9 @@ AS_IF([test "$with_libvirt" != "no"],[
])
AM_CONDITIONAL([HAVE_LIBVIRT],[test "x$LIBVIRT_LIBS" != "x"])
+libvirt_ro_uri='qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock-ro'
+AC_SUBST([libvirt_ro_uri])
+
dnl libxml2 (highly recommended)
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
[AC_SUBST([LIBXML2_CFLAGS])
diff --git a/tests/extra/Makefile.am b/tests/extra/Makefile.am
index e5458478..41cc54c1 100644
--- a/tests/extra/Makefile.am
+++ b/tests/extra/Makefile.am
@@ -66,12 +66,10 @@ EXTRA_DIST = \
VG = @VG@
RUN_VG = $(abs_top_builddir)/run $(VG)
-libvirt_uri = qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock-ro
-
# Choose guests at random on each run.
random_guests := \
$(shell \
- LIBVIRT_DEFAULT_URI="$(libvirt_uri)" \
+ LIBVIRT_DEFAULT_URI="$(libvirt_ro_uri)" \
$(abs_top_builddir)/run $(srcdir)/pick-guests.pl 5)
extra-tests-non-recursive: \
@@ -147,29 +145,29 @@ test-tools-internal:
# Invocations of tools on real images shouldn't leak memory.
test-df-real:
- $(RUN_VG) ../../df/virt-df -c "$(libvirt_uri)" >/dev/null
- $(RUN_VG) ../../df/virt-df -c "$(libvirt_uri)" -h >/dev/null
+ $(RUN_VG) ../../df/virt-df -c "$(libvirt_ro_uri)" >/dev/null
+ $(RUN_VG) ../../df/virt-df -c "$(libvirt_ro_uri)" -h >/dev/null
test-filesystems-real:
@for g in $(random_guests); do \
- echo $(RUN_VG) ../../cat/virt-filesystems -c "$(libvirt_uri)" -d $$g --all --long -h --uuid; \
- $(RUN_VG) ../../cat/virt-filesystems -c "$(libvirt_uri)" -d $$g --all --long -h --uuid > /dev/null; \
+ echo $(RUN_VG) ../../cat/virt-filesystems -c "$(libvirt_ro_uri)" -d $$g --all --long -h --uuid; \
+ $(RUN_VG) ../../cat/virt-filesystems -c "$(libvirt_ro_uri)" -d $$g --all --long -h --uuid > /dev/null; \
r=$$?; \
if [ $$r -ne 0 ]; then exit $$r; fi; \
done
test-inspector-real:
@for g in $(random_guests); do \
- echo $(RUN_VG) ../../inspector/virt-inspector -c "$(libvirt_uri)" -d $$g; \
- $(RUN_VG) ../../inspector/virt-inspector -c "$(libvirt_uri)" -d $$g > /dev/null; \
+ echo $(RUN_VG) ../../inspector/virt-inspector -c "$(libvirt_ro_uri)" -d $$g; \
+ $(RUN_VG) ../../inspector/virt-inspector -c "$(libvirt_ro_uri)" -d $$g > /dev/null; \
r=$$?; \
if [ $$r -ne 0 ]; then exit $$r; fi; \
done
test-sysprep-real:
@for g in $(random_guests); do \
- echo $(RUN_VG) ../../sysprep/virt-sysprep -n -c "$(libvirt_uri)" -d $$g; \
- $(RUN_VG) ../../sysprep/virt-sysprep -n -c "$(libvirt_uri)" -d $$g > /dev/null; \
+ echo $(RUN_VG) ../../sysprep/virt-sysprep -n -c "$(libvirt_ro_uri)" -d $$g; \
+ $(RUN_VG) ../../sysprep/virt-sysprep -n -c "$(libvirt_ro_uri)" -d $$g > /dev/null; \
r=$$?; \
if [ $$r -ne 0 ]; then exit $$r; fi; \
done