summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-30 14:00:54 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-03 00:10:20 +0100
commitdf4e38fcc3232da3ed63ebca6f7b9ff7665b1e40 (patch)
treef97db15194aaaf42c1f8e412ffa742428dfa541e
parent7f283b29f14fc3c39fdb164f2c8e9ca18b4442ea (diff)
downloadsamba-df4e38fcc3232da3ed63ebca6f7b9ff7665b1e40.tar.gz
samba-df4e38fcc3232da3ed63ebca6f7b9ff7665b1e40.tar.bz2
samba-df4e38fcc3232da3ed63ebca6f7b9ff7665b1e40.zip
s3:selftest: run test_posix_s3.sh tests
metze
-rw-r--r--source3/Makefile.in4
-rwxr-xr-xsource3/selftest/tests.sh39
2 files changed, 42 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9d08f7e9ca..531f64f92f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2954,7 +2954,9 @@ selftestdir = ../selftest
S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin"
selftest:: all torture timelimit
- @$(S3_LD_LIBPATH_OVERRIDE) PERL="$(PERL)" \
+ @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
+ SAMBA4SHAREDDIR="$(builddir)/bin/shared" SMBTORTURE4=$(smbtorture4_path) \
+ PERL="$(PERL)" PYTHON="$(PYTHON)" \
$(PERL) $(selftestdir)/selftest.pl \
--prefix=${selftest_prefix} --target=samba3 \
--testlist="$(srcdir)/selftest/tests.sh|" \
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 0ac194ef17..812a3a7fe8 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -129,3 +129,42 @@ plantest "blackbox.smbclient_s3.crypt" dc BINDIR="$BINDIR" script/tests/test_smb
plantest "blackbox.net_s3" dc BINDIR="$BINDIR" SCRIPTDIR="$SCRIPTDIR" 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
+
+)
+