2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 34 test suite.
5 # The output of this script is parsed by selftest.pl, which then decides
6 # which of the tests to actually run. It will, for example, skip all tests
7 # listed in selftest/skip34 or only run a subset during "make quicktest".
9 # The idea is that this script outputs all of the tests of Samba 34, not
10 # just those that are known to pass, and list those that should be skipped
11 # or are known to fail in selftest/skip34 or selftest/knownfail34. This makes it
12 # very easy to see what functionality is still missing in Samba 34 and makes
13 # it possible to run the testsuite against other servers, such as
14 # Windows that have a different set of features.
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed
17 # by the name of the test, the environment it needs and the command to run, all
18 # three separated by newlines. All other lines in the output are considered
32 if [ "$env" = "none" ]; then
35 echo "samba34.$name ($env)"
41 normalize_testname() {
44 echo $name | tr "A-Z-" "a-z."
47 plansmbtorture4test() {
52 modname=`normalize_testname $name`
53 cmdline="$VALGRIND $smb4torture $other_args $name"
54 plantest "$modname" "$env" $cmdline
57 samba4srcdir="`dirname $0`/.."
58 samba4bindir="$BUILDDIR/bin"
59 smb4torture="$samba4bindir/smbtorture4"
63 TORTURE_OPTIONS="$TORTURE_OPTIONS $CONFIGURATION"
64 TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
65 TORTURE_OPTIONS="$TORTURE_OPTIONS --target=samba3"
66 TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$SELFTEST_PREFIX"
67 if [ -n "$SELFTEST_VERBOSE" ]; then
68 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no"
70 TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit"
71 if [ -n "$SELFTEST_QUICK" ]; then
72 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
74 smb4torture="$smb4torture $TORTURE_OPTIONS"
76 echo "OPTIONS $TORTURE_OPTIONS"
78 plantest `normalize_testname Hello World` none echo "Hello World"
80 plantest `normalize_testname Hello World` franky_dc echo "Hello World"
82 for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA
85 plansmbtorture4test "$t" franky_dc "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_
88 # Tests against the NTVFS POSIX backend
90 NTVFSARGS="${NTVFSARGS} --option=torture:sharedelay=100000"
91 NTVFSARGS="${NTVFSARGS} --option=torture:oplocktimeout=3"
92 NTVFSARGS="${NTVFSARGS} --option=torture:writetimeupdatedelay=500000"
94 #The QFILEINFO-IPC test needs to be on ipc$
95 raw=`$smb4torture --list | grep "^RAW-" | grep -v "RAW-QFILEINFO-IPC"| xargs`
96 base=`$smb4torture --list | grep "^BASE-" | xargs`
98 for t in $base $raw; do
99 plansmbtorture4test "$t" franky_dc $ADDARGS //\$SERVER_IP/tmp -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS
102 plansmbtorture4test "RAW-QFILEINFO-IPC" franky_dc $ADDARGS //\$SERVER_IP/ipc$ -U"\$USERNAME"%"\$PASSWORD"
104 rap=`$smb4torture --list | grep "^RAP-" | xargs`
106 plansmbtorture4test "$t" franky_dc $ADDARGS //\$SERVER_IP/IPC\\\$ -U"\$USERNAME"%"\$PASSWORD"