Commit | Line | Data |
---|---|---|
a4772a4d MP |
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 | ||
068a7221 | 14 | test_names="rsync-hello hands" |
a4772a4d MP |
15 | |
16 | export rsync_bin | |
17 | export testdir | |
18 | ||
5b7be6ee MP |
19 | skipped=0 |
20 | missing=0 | |
21 | passed=0 | |
22 | failed=0 | |
23 | ||
bc888e05 | 24 | testsrcdir="`pwd`" |
a4772a4d MP |
25 | |
26 | for testbase in $test_names | |
27 | do | |
bc888e05 | 28 | testscript="$testsrcdir/$testbase.test" |
a4772a4d MP |
29 | if test \! -f "$testscript" |
30 | then | |
31 | echo "$testscript does not exist" >&2 | |
5b7be6ee | 32 | missing=`expr $missing + 1` |
a4772a4d MP |
33 | continue |
34 | fi | |
35 | ||
951351a5 MP |
36 | echo "------------------------------------------------------------" |
37 | echo "----- $testbase running" | |
38 | ||
a4772a4d MP |
39 | if sh $testscript |
40 | then | |
41 | echo "----- $testbase completed succesfully" | |
5b7be6ee | 42 | passed=`expr $passed + 1` |
a4772a4d MP |
43 | else |
44 | echo "----- $testbase failed!" | |
5b7be6ee | 45 | failed=`expr $failed + 1` |
a4772a4d MP |
46 | fi |
47 | done | |
48 | ||
49 | echo '------------------------------------------------------------' | |
5b7be6ee MP |
50 | echo "----- overall results:" |
51 | echo " $passed passed" | |
52 | echo " $failed failed" | |
53 | echo " $skipped skipped" | |
54 | echo " $missing missing" | |
55 | echo '------------------------------------------------------------' |