diff options
author | Chris Lalancette <clalance@redhat.com> | 2009-09-23 09:32:10 +0200 |
---|---|---|
committer | Chris Lalancette <clalance@redhat.com> | 2009-10-07 12:18:13 +0200 |
commit | db68d6b1647f42e62cdb3c3e3708920d46ac9649 (patch) | |
tree | e1bb89c1a7baf70bd9c13822717730fadcda8a63 /tests/libvirtd-fail | |
parent | Create /var/log/libvirt/{lxc,uml} dirs (diff) | |
download | libvirt-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-x | tests/libvirtd-fail | 10 |
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 |