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