Try to fix "make check" directory path.
[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
4df7868d
MP
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.
15
16# srcdir gives the location of the source tree, which lets us find the
17# build scripts. It might be relative, so we need to make it
18# absolute.
19
20# The pwd is undefined when this script starts.
21
22srcdir=`cd $srcdir && pwd`
23
a4772a4d 24echo "============================================================"
4df7868d
MP
25echo "$0 running in `pwd`"
26echo " rsync_bin=$rsync_bin"
27echo " srcdir=$srcdir"
28
29set -e
a4772a4d 30
068a7221 31test_names="rsync-hello hands"
a4772a4d
MP
32
33export rsync_bin
34export testdir
35
5b7be6ee
MP
36skipped=0
37missing=0
38passed=0
39failed=0
40
4df7868d
MP
41suitedir="$srcdir/testsuite"
42cd "$suitedir"
43echo " suitedir=$suitedir"
a4772a4d
MP
44
45for testbase in $test_names
46do
4df7868d 47 testscript="./$testbase.test"
a4772a4d
MP
48 if test \! -f "$testscript"
49 then
50 echo "$testscript does not exist" >&2
5b7be6ee 51 missing=`expr $missing + 1`
a4772a4d
MP
52 continue
53 fi
54
951351a5
MP
55 echo "------------------------------------------------------------"
56 echo "----- $testbase running"
57
a4772a4d
MP
58 if sh $testscript
59 then
60 echo "----- $testbase completed succesfully"
5b7be6ee 61 passed=`expr $passed + 1`
a4772a4d
MP
62 else
63 echo "----- $testbase failed!"
5b7be6ee 64 failed=`expr $failed + 1`
a4772a4d
MP
65 fi
66done
67
68echo '------------------------------------------------------------'
5b7be6ee
MP
69echo "----- overall results:"
70echo " $passed passed"
71echo " $failed failed"
72echo " $skipped skipped"
73echo " $missing missing"
74echo '------------------------------------------------------------'