Try to fix "make check" directory path.
authorMartin Pool <mbp@samba.org>
Fri, 17 Aug 2001 01:34:31 +0000 (01:34 +0000)
committerMartin Pool <mbp@samba.org>
Fri, 17 Aug 2001 01:34:31 +0000 (01:34 +0000)
Don't wait for input at end of tests.

Makefile.in
testsuite/master.test
testsuite/rsync-hello.test

index 15e788e..ee6b5c4 100644 (file)
@@ -17,7 +17,6 @@ srcdir=@srcdir@
 VPATH=$(srcdir)
 SHELL=/bin/sh
 
 VPATH=$(srcdir)
 SHELL=/bin/sh
 
-
 .SUFFIXES:
 .SUFFIXES: .c .o
 
 .SUFFIXES:
 .SUFFIXES: .c .o
 
@@ -93,4 +92,4 @@ finddead:
 test: check
 
 check:
 test: check
 
 check:
-       rsync_bin=`pwd`/rsync testdir=$(srcdir)/testsuite $(srcdir)/testsuite/master.test
+       rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/testsuite/master.test
index 5356d22..4f9f286 100755 (executable)
@@ -8,8 +8,25 @@
 
 # We need a few environment variables to know what to test.
 
 
 # We need a few environment variables to know what to test.
 
+# rsync_bin gives the location of the rsync binary.  This is either
+# builddir/rsync if we're testing an uninstalled copy, or
+# install_prefix/bin/rsync if we're testing an installed copy.  On the
+# build farm rsync will be installed, but into a scratch /usr.
+
+# srcdir gives the location of the source tree, which lets us find the
+# build scripts.  It might be relative, so we need to make it
+# absolute.
+
+# The pwd is undefined when this script starts.
+
+srcdir=`cd $srcdir && pwd`
+
 echo "============================================================"
 echo "============================================================"
-echo "$0 running"
+echo "$0 running in `pwd`"
+echo "    rsync_bin=$rsync_bin"
+echo "    srcdir=$srcdir"
+
+set -e
 
 test_names="rsync-hello hands"
 
 
 test_names="rsync-hello hands"
 
@@ -21,11 +38,13 @@ missing=0
 passed=0
 failed=0
 
 passed=0
 failed=0
 
-testsrcdir="`pwd`"
+suitedir="$srcdir/testsuite"
+cd "$suitedir"
+echo "    suitedir=$suitedir"
 
 for testbase in $test_names
 do
 
 for testbase in $test_names
 do
-    testscript="$testsrcdir/$testbase.test"
+    testscript="./$testbase.test"
     if test \! -f "$testscript" 
     then
        echo "$testscript does not exist" >&2
     if test \! -f "$testscript" 
     then
        echo "$testscript does not exist" >&2
index a925668..2aacc28 100755 (executable)
@@ -1,3 +1,5 @@
 #! /bin/sh
 
 #! /bin/sh
 
+echo $0 running
+
 "$rsync_bin" --version || exit 1
 "$rsync_bin" --version || exit 1