testsuite: make diagnostic output more appropriate in tests_all.sh
[kai/samba.git] / source3 / script / tests / tests_all.sh
1 local_s3() {
2         echo "RUNNING TESTS local_s3"
3         $SCRIPTDIR/test_local_s3.sh \
4         || failed=`expr $failed + $?`
5 }
6
7 smbtorture_s3() {
8         echo "RUNNING TESTS 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 TESTS 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 TESTS smbclient_s3"
23         $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP \
24         || failed=`expr $failed + $?`
25 }
26
27 smbclient_s3_encrypted() {
28         echo "RUNNING TESTS 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 TESTS 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 TESTS ntlm_auth_s3"
41         $SCRIPTDIR/test_ntlm_auth_s3.sh \
42         || failed=`expr $failed + $?`
43 }
44
45 net_s3() {
46         echo "RUNNING TESTS net_s3"
47         $SCRIPTDIR/test_net_s3.sh \
48         || failed=`expr $failed + $?`
49 }
50
51 posix_s3() {
52         echo "RUNNING TESTS posix_s3"
53         eval "$LIB_PATH_VAR="\$SAMBA4SHAREDDIR:\$$LIB_PATH_VAR"; export $LIB_PATH_VAR"
54         eval echo "$LIB_PATH_VAR=\$$LIB_PATH_VAR"
55         SMBTORTURE4VERSION=`$SMBTORTURE4 --version`
56         if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
57                 echo "Running Tests with Samba4's smbtorture"
58                 echo $SMBTORTURE4VERSION
59                 $SCRIPTDIR/test_posix_s3.sh \
60                         //$SERVER_IP/tmp $USERNAME $PASSWORD "" \
61                 || failed=`expr $failed + $?`
62         else
63                 echo "Skip Tests with Samba4's smbtorture"
64         fi
65 }
66
67 if test "x$TESTS" = "x" ; then
68         local_s3
69         smbtorture_s3
70         smbtorture_s3_encrypted
71         smbclient_s3
72         smbclient_s3_encrypted
73         wbinfo_s3
74         ntlm_auth_s3
75         net_s3
76         posix_s3
77 else
78         for THIS_TEST in $TESTS; do
79                 $THIS_TEST
80         done
81 fi
82