From c4a3ea066be9823d4572b57fd05940345904b826 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 Nov 2012 09:01:53 +0000 Subject: extra-tests: Add $(libvirt_ro_uri) substitution to configure. This is essentially just code motion. --- configure.ac | 3 +++ tests/extra/Makefile.am | 20 +++++++++----------- 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 -- cgit