summaryrefslogtreecommitdiff
path: root/source3/selftest/tests.sh
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-02-05 16:39:28 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-02-05 16:39:28 +0100
commit6d139ca4680abcbda5110f2f0886aa038ff62088 (patch)
tree7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/selftest/tests.sh
parent4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff)
parentafa960cbbcd609123d710c301e7a9a070c1fed70 (diff)
downloadsamba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz
samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2
samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts: librpc/ndr.pc.in
Diffstat (limited to 'source3/selftest/tests.sh')
-rwxr-xr-xsource3/selftest/tests.sh140
1 files changed, 120 insertions, 20 deletions
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 98568b6bb3..f88dab0337 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -44,27 +44,127 @@ normalize_testname() {
echo $name | tr "A-Z-" "a-z."
}
+TEST_FUNCTIONS_SH="INCLUDED"
+testit() {
+ name=$1
+ shift 1
+ cmdline="$*"
+
+ plantest "`normalize_testname $testitprefix$name`" $testitenv $cmdline
+ return
+}
+
+testok() {
+ true
+ return
+}
+
BINDIR=`dirname $0`/../bin
+export BINDIR
+
SCRIPTDIR=`dirname $0`/../script/tests
export SCRIPTDIR
-plantest "talloctort" none $VALGRIND $BINDIR/talloctort
-plantest "replacetort" none $VALGRIND $BINDIR/replacetort
-plantest "tdbtorture" none $VALGRIND $BINDIR/tdbtorture
-plantest "smbconftort" none $VALGRIND $BINDIR/smbconftort $CONFIGURATION
-
-tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7"
-tests="$tests UNLINK BROWSE ATTR TRANS2 TORTURE "
-tests="$tests OPLOCK1 OPLOCK2 OPLOCK3"
-tests="$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3"
-tests="$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K"
-tests="$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE"
-
-for t in $tests; do
- name=`normalize_testname $t`
- plantest "$name" dc $VALGRIND $BINDIR/smbtorture //\$SERVER/tmp -U\$USERNAME%\$PASSWORD $t
-done
-
-plantest "blackbox.smbclient" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP
-plantest "blackbox.wbinfo" dc BINDIR="$BINDIR" script/tests/test_wbinfo_s3.sh \$DOMAIN \$SERVER \$USERNAME \$PASSWORD
-plantest "blackbox.net" dc BINDIR="$BINDIR" SCRIPTDIR="$SCRIPTDIR" script/tests/test_net_s3.sh
+CONFIGURATION="--configfile \$SMB_CONF_PATH"
+export CONFIGURATION
+
+CONFFILE="\$SMB_CONF_PATH"
+export CONFFILE
+
+SERVER="\$SERVER"
+export SERVER
+
+USERNAME="\$USERNAME"
+export USERNAME
+
+PASSWORD="\$PASSWORD"
+export PASSWORD
+
+(
+ shift $#
+ testitprefix="local_s3."
+ testitenv="none"
+ . $SCRIPTDIR/test_local_s3.sh
+)
+
+(
+ shift $#
+ testitprefix="smbtorture_s3.plain."
+ testitenv="dc"
+ . $SCRIPTDIR/test_smbtorture_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" ""
+)
+
+(
+ shift $#
+ testitprefix="smbtorture_s3.crypt."
+ testitenv="dc"
+ . $SCRIPTDIR/test_smbtorture_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" "-e"
+)
+
+(
+ shift $#
+ testitprefix="wbinfo_s3."
+ testitenv="dc:local"
+ . $SCRIPTDIR/test_wbinfo_s3.sh \$WORKGROUP \$SERVER \$USERNAME \$PASSWORD
+)
+
+(
+ shift $#
+ testitprefix="ntlm_auth_s3."
+ testitenv="dc:local"
+ . $SCRIPTDIR/test_ntlm_auth_s3.sh
+)
+
+# plain
+plantest "blackbox.smbclient_s3.plain" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD
+plantest "blackbox.smbclient_s3.plain member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD
+plantest "blackbox.smbclient_s3.plain domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD
+
+# encrypted
+plantest "blackbox.smbclient_s3.crypt" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD "-e"
+
+# these don't work yet
+#plantest "blackbox.smbclient_s3.crypt member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD "-e"
+#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"
+
+plantest "blackbox.net_s3" dc:local BINDIR="$BINDIR" SCRIPTDIR="$SCRIPTDIR" SERVERCONFFILE="\$SMB_CONF_PATH" script/tests/test_net_s3.sh
+
+(
+ shift $#
+ testitprefix="posix_s3."
+ testitenv="dc:local"
+
+ SMBTORTURE4BINARY=$SMBTORTURE4
+ TORTURE4_OPTIONS=""
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --configfile=\$SMB_CONF_PATH"
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --target=$SELFTEST_TARGET"
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --basedir=$SELFTEST_PREFIX"
+ if [ -n "$SELFTEST_VERBOSE" ]; then
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --option=torture:progress=no"
+ fi
+ TORTURE_OPTIONS="$TORTURE4_OPTIONS --format=subunit"
+ if [ -n "$SELFTEST_QUICK" ]; then
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --option=torture:quick=yes"
+ fi
+
+ # This is an ugly hack...
+ TORTURE4_OPTIONS="$TORTURE4_OPTIONS --option=torture:localdir=$SELFTEST_PREFIX/dc/share"
+
+ if [ -x "$SMBTORTURE4" ]; then
+ LIB_PATH_VAR_VAR="\$`echo $LIB_PATH_VAR`"
+ S4_LIB_PREFIX=`eval echo "$LIB_PATH_VAR=\"$SAMBA4SHAREDDIR:$LIB_PATH_VAR_VAR\""`
+ SMBTORTURE4="$S4_LIB_PREFIX $SMBTORTURE4"
+ SMBTORTURE4VERSION=`eval $SMBTORTURE4 --version`
+ fi
+ if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
+ echo "Using SMBTORTURE4: $SMBTORTURE4BINARY"
+ echo "Version: $SMBTORTURE4VERSION"
+ . $SCRIPTDIR/test_posix_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" ""
+ else
+ echo "Skip Tests with Samba4's smbtorture"
+ echo "Try to compile with --with-smbtorture4-path=PATH to enable"
+ fi
+
+)
+