summaryrefslogtreecommitdiffstats
path: root/inspector
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-12 17:54:31 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-13 15:26:29 +0000
commit3636c5fcff69e7a5a5afa126a597883db4c781bb (patch)
tree0d1406c121f1fb684b54f0d33b564246774bb826 /inspector
parentc4a3ea066be9823d4572b57fd05940345904b826 (diff)
downloadlibguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.tar.gz
libguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.tar.xz
libguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.zip
tests: Replace 'make extra-tests' with individual tests.
'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
Diffstat (limited to 'inspector')
-rw-r--r--inspector/Makefile.am8
-rwxr-xr-xinspector/test-virt-inspector.sh4
2 files changed, 10 insertions, 2 deletions
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index a72d7f18..6004f12c 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -99,6 +99,14 @@ if HAVE_XMLLINT
TESTS += test-xmllint.sh
endif
+check-valgrind:
+ $(MAKE) TESTS="test-virt-inspector.sh" VG="$(top_builddir)/run @VG@" check
+
+check-valgrind-local-guests:
+ for g in $(GUESTS); do \
+ $(top_builddir)/run --test @VG@ ./virt-inspector -c "$(libvirt_ro_uri)" -d "$$g" || exit $$?; \
+ done
+
endif
# These rules require virt-inspector so there is no good time that we
diff --git a/inspector/test-virt-inspector.sh b/inspector/test-virt-inspector.sh
index 517ae1e4..fad5e583 100755
--- a/inspector/test-virt-inspector.sh
+++ b/inspector/test-virt-inspector.sh
@@ -20,11 +20,11 @@ export LANG=C
set -e
for f in ../tests/guests/{debian,fedora,ubuntu,windows}.img; do
- ./virt-inspector -a $f
+ $VG ./virt-inspector -a $f
done
# We could also test this image, but mdadm is problematic for
# many users.
-# ./virt-inspector \
+# $VG ./virt-inspector \
# -a ../tests/guests/fedora-md1.img \
# -a ../tests/guests/fedora-md2.img