diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-21 16:01:44 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-02-22 16:20:10 +1100 |
commit | a82d9e4e72d624916b1e12393a73a4d79ae080d2 (patch) | |
tree | 91b8a2ad1beec40bc7c9fac497b80be0ded13b26 /source3/script/tests/test_ntlm_auth_s3.sh | |
parent | 0b066b88dfbcc612089cdb5d971b7bb1bb7542ed (diff) | |
download | samba-a82d9e4e72d624916b1e12393a73a4d79ae080d2.tar.gz samba-a82d9e4e72d624916b1e12393a73a4d79ae080d2.tar.bz2 samba-a82d9e4e72d624916b1e12393a73a4d79ae080d2.zip |
s3-selftest convert tests.sh to python
This should allow us a much better chance of invoking the subunit
wrappers in the right way, at the right level.
Andrew Bartlett
Diffstat (limited to 'source3/script/tests/test_ntlm_auth_s3.sh')
-rwxr-xr-x | source3/script/tests/test_ntlm_auth_s3.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh index 17aabef98e..4f84982503 100755 --- a/source3/script/tests/test_ntlm_auth_s3.sh +++ b/source3/script/tests/test_ntlm_auth_s3.sh @@ -1,5 +1,17 @@ #!/bin/sh +if [ $# -lt 2 ]; then +cat <<EOF +Usage: test_ntlm_auth_s3.sh PYTHON SRC3DIR +EOF +exit 1; +fi + +PYTHON=$1 +SRC3DIR=$2 +shift 2 +ADDARGS="$*" + test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && { incdir=`dirname $0`/../../../testprogs/blackbox . $incdir/subunit.sh @@ -7,17 +19,9 @@ incdir=`dirname $0`/../../../testprogs/blackbox failed=0 -(/usr/bin/env python --version > /dev/null 2>&1) - -if test $? -ne 0; -then - echo "Python binary not found in path. Skipping ntlm_auth tests." - exit 0 -fi - -testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth --configfile=$CONFFILE || failed=`expr $failed + 1` +testit "ntlm_auth" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth $ADDARGS || failed=`expr $failed + 1` # This should work even with NTLMv2 -testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth --configfile=$CONFFILE --client-domain=fOo --server-domain=fOo || failed=`expr $failed + 1` +testit "ntlm_auth" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth $ADDARGS --client-domain=fOo --server-domain=fOo || failed=`expr $failed + 1` testok $0 $failed |