2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 3 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/skip or only run a subset during "make quicktest".
9 # The idea is that this script outputs all of the tests of Samba 3, not
10 # just those that are known to pass, and list those that should be skipped
11 # or are known to fail in selftest/skip or selftest/samba4-knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba 3 and makes
13 # it possible to run the testsuite against other servers, such as Samba 4 or
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 "samba3.$name ($env)"
41 normalize_testname
() {
44 echo $name |
tr "A-Z-" "a-z."
47 TEST_FUNCTIONS_SH
="INCLUDED"
53 plantest
"`normalize_testname $testitprefix$name`" $testitenv $cmdline
62 BINDIR
=`dirname $0`/..
/bin
65 SCRIPTDIR
=`dirname $0`/..
/script
/tests
68 CONFIGURATION
="--configfile \$SMB_CONF_PATH"
71 CONFFILE
="\$SMB_CONF_PATH"
85 testitprefix
="local_s3."
87 .
$SCRIPTDIR/test_local_s3.sh
92 testitprefix
="smbtorture_s3.plain."
94 .
$SCRIPTDIR/test_smbtorture_s3.sh
//\
$SERVER_IP/tmp \
$USERNAME \
$PASSWORD "" ""
99 testitprefix
="smbtorture_s3.crypt."
101 .
$SCRIPTDIR/test_smbtorture_s3.sh
//\
$SERVER_IP/tmp \
$USERNAME \
$PASSWORD "" "-e"
106 testitprefix
="wbinfo_s3."
108 .
$SCRIPTDIR/test_wbinfo_s3.sh \
$DOMAIN \
$SERVER \
$USERNAME \
$PASSWORD
113 testitprefix
="wbinfo_s3."
115 .
$SCRIPTDIR/test_wbinfo_s3.sh \
$DOMAIN \
$SERVER \
$DOMAIN\\\\\
$USERNAME \
$PASSWORD
120 testitprefix
="wbinfo_s3."
121 testitenv
="member:local"
122 .
$SCRIPTDIR/test_wbinfo_s3.sh \
$DOMAIN \
$SERVER \
$DOMAIN\\\\\
$USERNAME \
$PASSWORD
127 testitprefix
="ntlm_auth_s3."
129 .
$SCRIPTDIR/test_ntlm_auth_s3.sh
133 plantest
"blackbox.smbclient_s3.plain" dc BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$USERNAME \
$PASSWORD
134 plantest
"blackbox.smbclient_s3.plain member creds" member BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$SERVER\\\\\
$USERNAME \
$PASSWORD
135 plantest
"blackbox.smbclient_s3.plain domain creds" member BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$DOMAIN\\\\\
$DC_USERNAME \
$DC_PASSWORD
137 # sign, only the member server allows signing
138 plantest
"blackbox.smbclient_s3.sign member creds" member BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$SERVER\\\\\
$USERNAME \
$PASSWORD "--signing=required"
139 plantest
"blackbox.smbclient_s3.sign domain creds" member BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$DOMAIN\\\\\
$DC_USERNAME \
$DC_PASSWORD "--signing=required"
142 plantest
"blackbox.smbclient_s3.crypt" dc BINDIR
="$BINDIR" script
/tests
/test_smbclient_s3.sh \
$SERVER \
$SERVER_IP \
$USERNAME \
$PASSWORD "-e"
144 # these don't work yet
145 #plantest "blackbox.smbclient_s3.crypt member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD "-e"
146 #plantest "blackbox.smbclient_s3.crypt domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD "-e"
148 plantest
"blackbox.net_s3" dc:local BINDIR
="$BINDIR" SCRIPTDIR
="$SCRIPTDIR" SERVERCONFFILE
="\$SMB_CONF_PATH" script
/tests
/test_net_s3.sh
152 testitprefix
="posix_s3."
155 SMBTORTURE4BINARY
=$SMBTORTURE4
157 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --configfile=\$SMB_CONF_PATH"
158 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
159 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --target=$SELFTEST_TARGET"
160 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --basedir=$SELFTEST_PREFIX"
161 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --option=\"torture:winbindd_netbios_name=\$SERVER\""
162 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --option=\"torture:winbindd_netbios_domain=\$DOMAIN\""
163 if [ -n "$SELFTEST_VERBOSE" ]; then
164 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --option=torture:progress=no"
166 TORTURE_OPTIONS
="$TORTURE4_OPTIONS --format=subunit"
167 if [ -n "$SELFTEST_QUICK" ]; then
168 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --option=torture:quick=yes"
171 # This is an ugly hack...
172 TORTURE4_OPTIONS
="$TORTURE4_OPTIONS --option=torture:localdir=$SELFTEST_PREFIX/dc/share"
174 if [ -x "$SMBTORTURE4" ]; then
175 LIB_PATH_VAR_VAR
="\$`echo $LIB_PATH_VAR`"
176 S4_LIB_PREFIX
=`eval echo "$LIB_PATH_VAR=\"$SAMBA4SHAREDDIR:$LIB_PATH_VAR_VAR\""`
177 SMBTORTURE4
="$S4_LIB_PREFIX $SMBTORTURE4"
178 SMBTORTURE4VERSION
=`eval $SMBTORTURE4 --version`
180 if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
181 echo "Using SMBTORTURE4: $SMBTORTURE4BINARY"
182 echo "Version: $SMBTORTURE4VERSION"
183 .
$SCRIPTDIR/test_posix_s3.sh
//\
$SERVER_IP/tmp \
$USERNAME \
$PASSWORD "" ""
185 echo "Skip Tests with Samba4's smbtorture"
186 echo "Try to compile with --with-smbtorture4-path=PATH to enable"