s3:tests: add a guard arround . $incdir/test_functions.sh
[ira/wip.git] / source3 / script / tests / test_smbtorture_s3.sh
1 #!/bin/sh
2
3 # this runs the file serving tests that are expected to pass with samba3
4
5 if [ $# -lt 3 ]; then
6 cat <<EOF
7 Usage: test_smbtorture_s3.sh UNC USERNAME PASSWORD <first> <smbtorture args>
8 EOF
9 exit 1;
10 fi
11
12 unc="$1"
13 username="$2"
14 password="$3"
15 start="$4"
16 shift 4
17 ADDARGS="$*"
18
19 test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
20 incdir=`dirname $0`
21 . $incdir/test_functions.sh
22 }
23
24 tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7"
25 #tests="$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE "
26 tests="$tests UNLINK BROWSE ATTR TRANS2 TORTURE "
27 tests="$tests OPLOCK1 OPLOCK2 OPLOCK3"
28 tests="$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3"
29 tests="$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K"
30 tests="$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE"
31
32 skipped1="RANDOMIPC NEGNOWAIT NBENCH ERRMAPEXTRACT TRANS2SCAN NTTRANSSCAN"
33 skipped2="DENY1 DENY2 OPENATTR CASETABLE EATEST"
34 skipped3="MANGLE UTABLE PIPE_NUMBER"
35 echo "Skipping the following tests:"
36 echo "$skipped1"
37 echo "$skipped2"
38 echo "$skipped3"
39
40 if test "x$SMBTORTURE_S3_SUBTESTS" != "x" ; then
41     tests="$SMBTORTURE_S3_SUBTESTS"
42 fi
43
44 failed=0
45 for t in $tests; do
46     if [ ! -z "$start" -a "$start" != $t ]; then
47         continue;
48     fi
49     start=""
50     name="$t"
51     testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" $ADDARGS $t || failed=`expr $failed + 1`
52 done
53
54 testok $0 $failed