X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=extratests%2FMakefile.am;h=e330e5cbea0d84be133de6c052db7ad2c1e67911;hb=270a2b5ebb6a5f01eb3f8cd2b591cd68d3b6096f;hp=382ee5ddbdc5a8e1bfd1669d19ff8e488dcde325;hpb=006607dea29e6b67fa35d7cd3086e00213890a8b;p=libguestfs.git diff --git a/extratests/Makefile.am b/extratests/Makefile.am index 382ee5d..e330e5c 100644 --- a/extratests/Makefile.am +++ b/extratests/Makefile.am @@ -24,15 +24,40 @@ # - valgrind # # These tests may fail for reasons which aren't necessarily real problems. +# +# XXX Not tested: +# +# ../clone/virt-sysprep +# - hard to test because it's a shell script +# +# ../edit/virt-edit +# +# Perl bindings +# ../edit/virt-edit -e +# ../tools/virt-win-reg (Perl) +# ../tools/virt-make-fs (Perl) +# - hard because Perl doesn't cooperate by freeing memory +# +# Python bindings +# - as for Perl +# +# Ruby bindings +# - these look feasible to test using valgrind +# +# Java bindings +# +# ../fuse/guestmount +# - hard to test because guestmount forks into the background, and +# if valgrind reports errors it doesn't stop the test shell script EXTRA_DIST = suppressions -VG = ../run \ - valgrind \ - --log-file=valgrind.log \ +VG = valgrind \ + --log-file=$(abs_builddir)/valgrind.log \ --leak-check=full \ --error-exitcode=119 \ - --suppressions=suppressions + --suppressions=$(abs_srcdir)/suppressions +RUN_VG = $(abs_top_builddir)/run $(VG) export LIBVIRT_DEFAULT_URI = \ qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock-ro @@ -42,62 +67,80 @@ GUESTS = $(shell virsh -c $(LIBVIRT_DEFAULT_URI) list --all | \ tail -n +3 | \ awk '{print $$2}') -extra-tests: test-tools-null test-tools-internal test-tools-real +extra-tests: \ + test-capitests \ + test-tools-null \ + test-tools-internal \ + test-df-real \ + test-filesystems-real \ + test-inspector-real \ + test-ocaml \ + test-resize \ + test-sparsify # Null invocations of the basic tools shouldn't leak memory. test-tools-null: - $(VG) ../fish/guestfish -N part exit - $(VG) ../align/virt-alignment-scan -a test1.img >/dev/null + $(RUN_VG) ../fish/guestfish -N part exit + $(RUN_VG) ../align/virt-alignment-scan -a test1.img >/dev/null rm test1.img - $(VG) ../cat/virt-filesystems -a /dev/null >/dev/null - $(VG) ../cat/virt-filesystems -a /dev/null --all --long -h --uuid >/dev/null - $(VG) ../df/virt-df -a /dev/null >/dev/null - $(VG) ../fish/guestfish -a /dev/null run - $(VG) ../inspector/virt-inspector -a /dev/null >/dev/null - $(VG) ../test-tool/libguestfs-test-tool >/dev/null 2>&1 + $(RUN_VG) ../cat/virt-filesystems -a /dev/null >/dev/null + $(RUN_VG) ../cat/virt-filesystems -a /dev/null --all --long -h --uuid >/dev/null + $(RUN_VG) ../df/virt-df -a /dev/null >/dev/null + $(RUN_VG) ../fish/guestfish -a /dev/null run + $(RUN_VG) ../inspector/virt-inspector -a /dev/null >/dev/null + $(RUN_VG) ../test-tool/libguestfs-test-tool >/dev/null 2>&1 # Invocations of tools on internal images shouldn't leak memory. test-tools-internal: - $(VG) ../cat/virt-cat -a ../images/fedora.img /etc/fstab >/dev/null - $(VG) ../cat/virt-filesystems -a ../images/fedora.img >/dev/null - $(VG) ../cat/virt-filesystems -a ../images/fedora.img --all --long -h --uuid >/dev/null - $(VG) ../cat/virt-ls -a ../images/fedora.img / >/dev/null - $(VG) ../cat/virt-ls -a ../images/fedora.img -l / >/dev/null - $(VG) ../cat/virt-ls -a ../images/fedora.img -R / >/dev/null - $(VG) ../cat/virt-ls -a ../images/fedora.img -lR / >/dev/null - $(VG) ../df/virt-df -a ../images/fedora.img >/dev/null - $(VG) ../df/virt-df -a ../images/fedora.img -h >/dev/null - $(VG) ../fish/guestfish -a ../images/fedora.img run - $(VG) ../fish/guestfish -a ../images/fedora.img -i exit - $(VG) ../inspector/virt-inspector -a ../images/debian.img >/dev/null - $(VG) ../inspector/virt-inspector -a ../images/fedora.img >/dev/null - $(VG) ../inspector/virt-inspector -a ../images/ubuntu.img >/dev/null - $(VG) ../inspector/virt-inspector -a ../images/windows.img >/dev/null + $(RUN_VG) ../cat/virt-cat -a ../images/fedora.img /etc/fstab >/dev/null + $(RUN_VG) ../cat/virt-filesystems -a ../images/fedora.img >/dev/null + $(RUN_VG) ../cat/virt-filesystems -a ../images/fedora.img --all --long -h --uuid >/dev/null + $(RUN_VG) ../cat/virt-ls -a ../images/fedora.img / >/dev/null + $(RUN_VG) ../cat/virt-ls -a ../images/fedora.img -l / >/dev/null + $(RUN_VG) ../cat/virt-ls -a ../images/fedora.img -R / >/dev/null + $(RUN_VG) ../cat/virt-ls -a ../images/fedora.img -lR / >/dev/null + $(RUN_VG) ../df/virt-df -a ../images/fedora.img >/dev/null + $(RUN_VG) ../df/virt-df -a ../images/fedora.img -h >/dev/null + $(RUN_VG) ../fish/guestfish -a ../images/fedora.img run + $(RUN_VG) ../fish/guestfish -a ../images/fedora.img -i exit + $(RUN_VG) ../inspector/virt-inspector -a ../images/debian.img >/dev/null + $(RUN_VG) ../inspector/virt-inspector -a ../images/fedora.img >/dev/null + $(RUN_VG) ../inspector/virt-inspector -a ../images/ubuntu.img >/dev/null + $(RUN_VG) ../inspector/virt-inspector -a ../images/windows.img >/dev/null # Invocations of tools on real images shouldn't leak memory. -test-tools-real: - $(VG) virt-df >/dev/null - $(VG) virt-df -h >/dev/null +test-df-real: + $(RUN_VG) virt-df >/dev/null + $(RUN_VG) virt-df -h >/dev/null + +test-filesystems-real: @for g in $(GUESTS); do \ - echo $(VG) ../inspector/virt-inspector -d $$g; \ - $(VG) ../inspector/virt-inspector -d $$g > /dev/null; \ + echo $(RUN_VG) ../cat/virt-filesystems -d $$g --all --long -h --uuid; \ + $(RUN_VG) ../cat/virt-filesystems -d $$g --all --long -h --uuid > /dev/null; \ r=$$?; \ if [ $$r -ne 0 ]; then exit $$r; fi; \ done + +test-inspector-real: @for g in $(GUESTS); do \ - echo $(VG) ../cat/virt-filesystems -d $$g --all --long -h --uuid; \ - $(VG) ../cat/virt-filesystems -d $$g --all --long -h --uuid > /dev/null; \ + echo $(RUN_VG) ../inspector/virt-inspector -d $$g; \ + $(RUN_VG) ../inspector/virt-inspector -d $$g > /dev/null; \ r=$$?; \ if [ $$r -ne 0 ]; then exit $$r; fi; \ done +# Run virt-resize tests under valgrind. +test-resize: + $(MAKE) -C ../resize VG="$(VG)" check -# XXX Not tested: -# ../clone/virt-sysprep -# ../edit/virt-edit -# ../edit/virt-edit -e -# ../fuse/guestmount -# ../resize/virt-resize (OCaml) -# ../sparsify/virt-sparsify (OCaml) -# ../tools/virt-win-reg (Perl) -# ../tools/virt-make-fs (Perl) +# Run virt-sparsify tests under valgrind. +test-sparsify: + $(MAKE) -C ../sparsify VG="$(VG)" check + +# Run capitests under valgrind. +test-capitests: + $(MAKE) -C ../capitests VG="$(RUN_VG)" check + +# Test OCaml bindings under valgrind. +test-ocaml: + $(MAKE) -C ../ocaml VG="$(VG)" check