test: add (and unify) sectioning output of subtests in tests_all.sh
[kai/samba.git] / source3 / script / tests / tests_all.sh
1 local_s3() {
2         echo "RUNNING SUBTESTS local_s3"
3         $SCRIPTDIR/test_local_s3.sh \
4         || failed=`expr $failed + $?`
5 }
6
7 smbtorture_s3() {
8         echo "RUNNING SUBTESTS smbtorture_s3"
9         $SCRIPTDIR/test_smbtorture_s3.sh \
10                 //$SERVER_IP/tmp $USERNAME $PASSWORD "" \
11         || failed=`expr $failed + $?`
12 }
13
14 smbtorture_s3_encrypted() {
15         echo "RUNNING SUBTESTS smbtorture_s3_encrypted"
16         $SCRIPTDIR/test_smbtorture_s3.sh \
17                 //$SERVER_IP/tmp $USERNAME $PASSWORD "" "-e" \
18         || failed=`expr $failed + $?`
19 }
20
21 smbclient_s3() {
22         echo "RUNNING SUBTESTS smbclient_s3"
23         $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP \
24         || failed=`expr $failed + $?`
25 }
26
27 smbclient_s3_encrypted() {
28         echo "RUNNING SUBTESTS smbclient_s3_encrypted"
29         $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP "-e" \
30         || failed=`expr $failed + $?`
31 }
32
33 wbinfo_s3() {
34         echo "RUNNING SUBTESTS wbinfo_s3"
35         $SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD \
36         || failed=`expr $failed + $?`
37 }
38
39 ntlm_auth_s3() {
40         echo "RUNNING SUBTESTS ntlm_auth_s3"
41         $SCRIPTDIR/test_ntlm_auth_s3.sh \
42         || failed=`expr $failed + $?`
43 }
44
45 posix_s3() {
46         echo "RUNNING SUBTESTS posix_s3"
47         eval "$LIB_PATH_VAR="\$SAMBA4SHAREDDIR:\$$LIB_PATH_VAR"; export $LIB_PATH_VAR"
48         eval echo "$LIB_PATH_VAR=\$$LIB_PATH_VAR"
49         SMBTORTURE4VERSION=`$SMBTORTURE4 --version`
50         if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
51                 echo "Running Tests with Samba4's smbtorture"
52                 echo $SMBTORTURE4VERSION
53                 $SCRIPTDIR/test_posix_s3.sh \
54                         //$SERVER_IP/tmp $USERNAME $PASSWORD "" \
55                 || failed=`expr $failed + $?`
56         else
57                 echo "Skip Tests with Samba4's smbtorture"
58         fi
59 }
60
61 if test "x$RUNTESTS" = "x" ; then
62         local_s3
63         smbtorture_s3
64         smbtorture_s3_encrypted
65         smbclient_s3
66         smbclient_s3_encrypted
67         wbinfo_s3
68         ntlm_auth_s3
69         posix_s3
70 else
71         for THIS_TEST in $RUNTESTS; do
72                 $THIS_TEST
73         done
74 fi
75