3 # Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5 # rsync top-level test script -- this invokes all the other more
6 # detailed tests in order. This script can either be called by 'make
7 # check' or through 'runlist' from the build farm.
9 # We need a few environment variables to know what to test.
11 # rsync_bin gives the location of the rsync binary. This is either
12 # builddir/rsync if we're testing an uninstalled copy, or
13 # install_prefix/bin/rsync if we're testing an installed copy. On the
14 # build farm rsync will be installed, but into a scratch /usr.
16 # srcdir gives the location of the source tree, which lets us find the
17 # build scripts. At the moment we assume we are invoked from the
20 # testdir is a scratch directory for holding temporary test files.
22 # The pwd is undefined when this script starts.
28 if ! [ -d "$testdir" ] && ! mkdir "$testdir"
30 echo "warning: testdir $testdir is not a directory!" >&2
34 testdir=`cd $testdir && pwd`
36 echo "srcdir is originally \"$srcdir\""
37 if [ "$srcdir" != "" ]
39 srcdir=`cd "$srcdir" && pwd`
42 echo "============================================================"
43 echo "$0 running in `pwd`"
44 echo " rsync_bin=$rsync_bin"
45 echo " srcdir=$srcdir"
46 echo " testdir=$testdir"
48 test_names="rsync-hello hands"
58 suitedir="$srcdir/testsuite"
59 echo " suitedir=$suitedir"
61 . "$suitedir/config.sh"
63 for testbase in $test_names
65 testscript="$suitedir/$testbase.test"
66 if test \! -f "$testscript"
68 echo "$testscript does not exist" >&2
69 missing=`expr $missing + 1`
73 echo "------------------------------------------------------------"
74 echo "----- $testbase running"
78 echo "----- $testbase completed succesfully"
79 passed=`expr $passed + 1`
81 echo "----- $testbase failed!"
82 failed=`expr $failed + 1`
86 echo '------------------------------------------------------------'
87 echo "----- overall results:"
88 echo " $passed passed"
89 echo " $failed failed"
90 echo " $skipped skipped"
91 echo " $missing missing"
92 echo '------------------------------------------------------------'