summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lalancette <clalance@redhat.com>2009-09-23 09:32:10 +0200
committerChris Lalancette <clalance@redhat.com>2009-10-07 12:18:13 +0200
commitdb68d6b1647f42e62cdb3c3e3708920d46ac9649 (patch)
treee1bb89c1a7baf70bd9c13822717730fadcda8a63 /tests/libvirtd-fail
parentCreate /var/log/libvirt/{lxc,uml} dirs (diff)
downloadlibvirt-db68d6b1647f42e62cdb3c3e3708920d46ac9649.tar.gz
libvirt-db68d6b1647f42e62cdb3c3e3708920d46ac9649.tar.bz2
libvirt-db68d6b1647f42e62cdb3c3e3708920d46ac9649.zip
Fix up "make check"
While running make check, I noticed that it was actually using the virsh binary from my system, in /usr/bin/virsh, and not the one that was just compiled. This is actually caused by a bug in Makefile.am, where we didn't update the PATH to include tools. While here, I also updated all of the scripts to properly define the srcdir, abs_top_srcdir, and abs_top_builddir environment variables. This is required if you want to be able to run the tests standalone (i.e. ./test instead of from make check). I've tested this on both RHEL-5 and Fedora-10 machines, and make check works on both, as does running the individual tests by hand. Signed-off-by: Chris Lalancette <clalance@redhat.com>
Diffstat (limited to 'tests/libvirtd-fail')
-rwxr-xr-xtests/libvirtd-fail10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/libvirtd-fail b/tests/libvirtd-fail
index eeb1ee68f..c6b6876bf 100755
--- a/tests/libvirtd-fail
+++ b/tests/libvirtd-fail
@@ -1,18 +1,20 @@
#!/bin/sh
# Ensure that libvirt fails when given nonexistent --config=FILE
+test -z "$srcdir" && srcdir=$(pwd)
+test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/..
+test -z "$abs_top_builddir" && abs_top_builddir=$(pwd)/..
+
if test "$VERBOSE" = yes; then
set -x
- libvirtd --version
+ $abs_top_builddir/daemon/libvirtd --version
fi
-test -z "$srcdir" && srcdir=$(pwd)
-test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/..
. "$srcdir/test-lib.sh"
fail=0
-libvirtd --config=no-such-conf --timeout=5 2> log
+$abs_top_builddir/daemon/libvirtd --config=no-such-conf --timeout=5 2> log
RET=$?
test "$RET" != "0" && exit 0 || exit 1