Move Samba4-specific code out of selftest.
[kai/samba-autobuild/.git] / source4 / selftest / tests.sh
index 5f148909e23cb596698edff7d654a5a05428a8b9..b02b7bb890c2f80eabbb84f40f9d00c8ccac7a1a 100755 (executable)
@@ -58,8 +58,31 @@ bin/smbtorture -V
 
 samba4srcdir=.
 samba4bindir=$samba4srcdir/bin
+
+prefix_abs="$SELFTEST_PREFIX/s4client"
+
+mkdir "$prefix_abs"
+conffile="$SELFTEST_CONFFILE"
+
+TORTURE_OPTIONS=""
+TORTURE_OPTIONS="$TORTURE_OPTIONS --configfile=$conffile"
+TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
+TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET"
+TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$prefix_abs"
+if [ -n "$SELFTEST_VERBOSE" ]; then
+       TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no"
+fi
+TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit"
+if [ -n "$SELFTEST_QUICK" ]; then
+       TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
+fi
 smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS"
 
+echo "OPTIONS $TORTURE_OPTIONS"
+
+SMB_CONF_PATH="$conffile"
+CONFIGURATION="--configfile=$conffile"
+
 # Simple tests for LDAP and CLDAP
 
 for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do