More test suite stuff
[rsync/rsync.git] / testsuite / master.test
index 4f9f286..ffacc1e 100755 (executable)
 # build scripts.  It might be relative, so we need to make it
 # absolute.
 
+# testdir is a scratch directory for holding temporary test files.
+
 # The pwd is undefined when this script starts.
 
+set -e
+
+if ! [ -d "$testdir" ] && ! mkdir "$testdir"
+then
+    echo "warning: testdir $testdir is not a directory!" >&2
+    exit 1
+fi
+
+testdir=`cd $testdir && pwd`
+
+echo "srcdir is originally $srcdir"
 srcdir=`cd $srcdir && pwd`
 
 echo "============================================================"
 echo "$0 running in `pwd`"
 echo "    rsync_bin=$rsync_bin"
 echo "    srcdir=$srcdir"
-
-set -e
+echo "    testdir=$testdir"
 
 test_names="rsync-hello hands"
 
@@ -42,6 +54,8 @@ suitedir="$srcdir/testsuite"
 cd "$suitedir"
 echo "    suitedir=$suitedir"
 
+. "$suitedir/config.sh"
+
 for testbase in $test_names
 do
     testscript="./$testbase.test"