5356d22c509f9aedba68a585be43410c4a9eaf1b
[rsync/rsync.git] / testsuite / master.test
1 #! /bin/sh
2
3 # Copyright (C) 2001 by Martin Pool <mbp@samba.org>
4
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.
8
9 # We need a few environment variables to know what to test.
10
11 echo "============================================================"
12 echo "$0 running"
13
14 test_names="rsync-hello hands"
15
16 export rsync_bin
17 export testdir
18
19 skipped=0
20 missing=0
21 passed=0
22 failed=0
23
24 testsrcdir="`pwd`"
25
26 for testbase in $test_names
27 do
28     testscript="$testsrcdir/$testbase.test"
29     if test \! -f "$testscript" 
30     then
31         echo "$testscript does not exist" >&2
32         missing=`expr $missing + 1`
33         continue
34     fi
35
36     echo "------------------------------------------------------------"
37     echo "----- $testbase running"
38
39     if sh $testscript
40     then
41         echo "----- $testbase completed succesfully"
42         passed=`expr $passed + 1`
43     else
44         echo "----- $testbase failed!"
45         failed=`expr $failed + 1`
46     fi  
47 done
48
49 echo '------------------------------------------------------------'
50 echo "----- overall results:"
51 echo "      $passed passed"
52 echo "      $failed failed"
53 echo "      $skipped skipped"
54 echo "      $missing missing"
55 echo '------------------------------------------------------------'