]> xenbits.xensource.com Git - libvirt.git/commitdiff
don't fail daemon-conf test when configured --without-qemu
authorJim Meyering <meyering@redhat.com>
Tue, 17 Feb 2009 10:23:48 +0000 (10:23 +0000)
committerJim Meyering <meyering@redhat.com>
Tue, 17 Feb 2009 10:23:48 +0000 (10:23 +0000)
* tests/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
* tests/daemon-conf: Use test-lib.sh.
Skip this test when configured --without-qemu.

ChangeLog
tests/Makefile.am
tests/daemon-conf

index 2fddcd40d04a2971963f136848d8b8f51e67a217..11f54f0b4966c49ffb319079b9bef88b1cc5272e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 17 11:21:00 +0100 2009 Jim Meyering <meyering@redhat.com>
+
+       don't fail daemon-conf test when configured --without-qemu
+       * tests/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
+       * tests/daemon-conf: Use test-lib.sh.
+       Skip this test when configured --without-qemu.
+
 Tue Feb 17 11:21:00 +0100 2009 Jim Meyering <meyering@redhat.com>
 
        accommodate configuring --without-lxc --without-qemu
index e467a86e992e6de3619cf1283a30728edbda1be1..877884f337a053b1218c24b5ad97b678363fcffe 100644 (file)
@@ -120,6 +120,7 @@ TESTS_ENVIRONMENT =                         \
   abs_top_srcdir=`cd '$(top_srcdir)'; pwd`     \
   abs_builddir=`cd '$(builddir)'; pwd`         \
   abs_srcdir=`cd '$(srcdir)'; pwd`             \
+  CONFIG_HEADER='$(abs_top_builddir)/lib/config.h' \
   PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"    \
   SHELL="$(SHELL)"                             \
   LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
index b357c39579a1349ba02c8d9d2c8f971ecd0576e1..7a53eff20205a7bae79b6e1ceec5a58831796794 100755 (executable)
@@ -6,16 +6,12 @@ if test "$VERBOSE" = yes; then
   libvirtd --version
 fi
 
-# Boilerplate code to set up a test directory, cd into it,
-# and to ensure we remove it upon completion.
-this_test_() { echo "./$0" | sed 's,.*/,,'; }
-t_=$(this_test_)-$$
-init_cwd_=$(pwd)
-trap 'st=$?; d='"$t_"';
-    cd '"$init_cwd_"' && chmod -R u+rwx "$d" && rm -rf "$d" && exit $st' 0
-trap '(exit $?); exit $?' 1 2 13 15
-mkdir "$t_" || fail=1
-cd "$t_" || fail=1
+test -z "$srcdir" && srcdir=$(pwd)
+test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/..
+. $srcdir/test-lib.sh
+
+grep '^#define WITH_QEMU 1' $CONFIG_HEADER > /dev/null ||
+  skip_test_ "configured without QEMU support"
 
 conf="$abs_top_srcdir/qemud/libvirtd.conf"