Find the right directory to run the test components.
[rsync/rsync.git] / testsuite / master.test
CommitLineData
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
11echo "============================================================"
12echo "$0 running"
13
068a7221 14test_names="rsync-hello hands"
a4772a4d
MP
15
16export rsync_bin
17export testdir
18
5b7be6ee
MP
19skipped=0
20missing=0
21passed=0
22failed=0
23
bc888e05 24testsrcdir="`pwd`"
a4772a4d
MP
25
26for testbase in $test_names
27do
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
47done
48
49echo '------------------------------------------------------------'
5b7be6ee
MP
50echo "----- overall results:"
51echo " $passed passed"
52echo " $failed failed"
53echo " $skipped skipped"
54echo " $missing missing"
55echo '------------------------------------------------------------'