diff options
author | Michael Adam <obnox@samba.org> | 2008-03-31 13:20:08 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-31 17:22:02 +0200 |
commit | e3aef196e44846ab8f8c34932eb6cc3037809d76 (patch) | |
tree | f47c38da6b030f874121a286957cf728955caaeb | |
parent | 0bf8ba9f267c073818d2d7b97556bdd9de6456bf (diff) | |
download | samba-e3aef196e44846ab8f8c34932eb6cc3037809d76.tar.gz samba-e3aef196e44846ab8f8c34932eb6cc3037809d76.tar.bz2 samba-e3aef196e44846ab8f8c34932eb6cc3037809d76.zip |
test: in tests_all.sh, wrap calls to test scripts into shell functions.
This is in preparation for enabling running only selected test scripts
through "make test".
Michael
(This used to be commit ad1fbadf81c915425301ec495744c11f3103169f)
-rwxr-xr-x | source3/script/tests/tests_all.sh | 83 |
1 files changed, 63 insertions, 20 deletions
diff --git a/source3/script/tests/tests_all.sh b/source3/script/tests/tests_all.sh index 369cf3ebe3..6153b6d3a8 100755 --- a/source3/script/tests/tests_all.sh +++ b/source3/script/tests/tests_all.sh @@ -1,20 +1,63 @@ -$SCRIPTDIR/test_local_s3.sh || failed=`expr $failed + $?` -$SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?` -echo "Testing encrypted" -$SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" "-e" || failed=`expr $failed + $?` -$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP || failed=`expr $failed + $?` -echo "Testing encrypted" -$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP "-e" || failed=`expr $failed + $?` -$SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?` -$SCRIPTDIR/test_ntlm_auth_s3.sh || failed=`expr $failed + $?` - -eval "$LIB_PATH_VAR="\$SAMBA4SHAREDDIR:\$$LIB_PATH_VAR"; export $LIB_PATH_VAR" -eval echo "$LIB_PATH_VAR=\$$LIB_PATH_VAR" -SMBTORTURE4VERSION=`$SMBTORTURE4 --version` -if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then - echo "Running Tests with Samba4's smbtorture" - echo $SMBTORTURE4VERSION - $SCRIPTDIR/test_posix_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?` -else - echo "Skip Tests with Samba4's smbtorture" -fi +local_s3() { + $SCRIPTDIR/test_local_s3.sh \ + || failed=`expr $failed + $?` +} + +smbtorture_s3() { + $SCRIPTDIR/test_smbtorture_s3.sh \ + //$SERVER_IP/tmp $USERNAME $PASSWORD "" \ + || failed=`expr $failed + $?` +} + +smbtorture_s3_encrypted() { + echo "Testing encrypted" + $SCRIPTDIR/test_smbtorture_s3.sh \ + //$SERVER_IP/tmp $USERNAME $PASSWORD "" "-e" \ + || failed=`expr $failed + $?` +} + +smbclient_s3() { + $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP \ + || failed=`expr $failed + $?` +} + +smbclient_s3_encrypted() { + echo "Testing encrypted" + $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP "-e" \ + || failed=`expr $failed + $?` +} + +wbinfo_s3() { + $SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD \ + || failed=`expr $failed + $?` +} + +ntlm_auth_s3() { + $SCRIPTDIR/test_ntlm_auth_s3.sh \ + || failed=`expr $failed + $?` +} + +posix_s3() { + eval "$LIB_PATH_VAR="\$SAMBA4SHAREDDIR:\$$LIB_PATH_VAR"; export $LIB_PATH_VAR" + eval echo "$LIB_PATH_VAR=\$$LIB_PATH_VAR" + SMBTORTURE4VERSION=`$SMBTORTURE4 --version` + if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then + echo "Running Tests with Samba4's smbtorture" + echo $SMBTORTURE4VERSION + $SCRIPTDIR/test_posix_s3.sh \ + //$SERVER_IP/tmp $USERNAME $PASSWORD "" \ + || failed=`expr $failed + $?` + else + echo "Skip Tests with Samba4's smbtorture" + fi +} + +local_s3 +smbtorture_s3 +smbtorture_s3_encrypted +smbclient_s3 +smbclient_s3_encrypted +wbinfo_s3 +ntlm_auth_s3 +posix_s3 + |