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/read-non-seekable | |
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/read-non-seekable')
-rwxr-xr-x | tests/read-non-seekable | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/read-non-seekable b/tests/read-non-seekable index 8a7bdcdf2..59c2389d6 100755 --- a/tests/read-non-seekable +++ b/tests/read-non-seekable @@ -16,12 +16,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +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 - virsh --version + $abs_top_builddir/tools/virsh --version fi -. $srcdir/test-lib.sh +. "$srcdir/test-lib.sh" fail=0 @@ -40,11 +44,11 @@ cat <<\EOF > dom </domain> EOF -virsh -c test:///default define dom > /dev/null || fail=1 +$abs_top_builddir/tools/virsh -c test:///default define dom > /dev/null || fail=1 mkfifo_or_skip_ fifo cat dom > fifo & -virsh -c test:///default define fifo > /dev/null || fail=1 +$abs_top_builddir/tools/virsh -c test:///default define fifo > /dev/null || fail=1 (exit $fail); exit $fail |