summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-05 23:09:38 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-05 23:09:38 +0100
commitaaa27706664da2855c09da0691c3717b571edaba (patch)
tree17cc8a7475f7062eb664d0201d660c77bf415a7e /source3/script/tests
parent3ba8fbef29aabfcd78e1170fcbfcf7bc943af6f9 (diff)
parent4a413e4bd177402a1697cffac43d35e94cc55102 (diff)
downloadsamba-aaa27706664da2855c09da0691c3717b571edaba.tar.gz
samba-aaa27706664da2855c09da0691c3717b571edaba.tar.bz2
samba-aaa27706664da2855c09da0691c3717b571edaba.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 5a30f6377d37d8a5cadce4fb9a2fc19b78fc1709)
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-xsource3/script/tests/selftest.sh13
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh12
-rwxr-xr-xsource3/script/tests/test_smbtorture_s3.sh2
-rwxr-xr-xsource3/script/tests/tests_all.sh7
4 files changed, 26 insertions, 8 deletions
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index d4264bab8c..86abb15ed1 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -62,7 +62,6 @@ export PATH SOCKET_WRAPPER_DIR DOMAIN
export PRIVATEDIR LIBDIR PIDDIR LOCKDIR LOGDIR SERVERCONFFILE
export SRCDIR SCRIPTDIR BINDIR
export USERNAME PASSWORD
-export SMBTORTURE4
export WORKGROUP SERVER SERVER_IP
export NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP
export WINBINDD_SOCKET_DIR WINBINDD_PRIV_PIPE_DIR
@@ -70,10 +69,20 @@ export WINBINDD_SOCKET_DIR WINBINDD_PRIV_PIPE_DIR
PATH=bin:$PATH
export PATH
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$BINDIR"
+if test x"$LD_LIBRARY_PATH" != x""; then
+ LD_LIBRARY_PATH="$BINDIR:$LD_LIBRARY_PATH"
+else
+ LD_LIBRARY_PATH="$BINDIR"
+fi
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
+SAMBA4BINDIR=`dirname $SMBTORTURE4`
+SAMBA4SHAREDDIR="$SAMBA4BINDIR/shared"
+
+export SAMBA4SHAREDDIR
+export SMBTORTURE4
+
##
## verify that we were built with --enable-socket-wrapper
##
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 3a8f3bd5b6..c10aed0ee6 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -2,7 +2,7 @@
# this runs the file serving tests that are expected to pass with samba3
-if [ $# != 2 ]; then
+if [ $# -lt 2 ]; then
cat <<EOF
Usage: test_smbclient_s3.sh SERVER SERVER_IP
EOF
@@ -12,6 +12,8 @@ fi
SERVER="$1"
SERVER_IP="$2"
SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
+shift 2
+ADDARGS="$*"
incdir=`dirname $0`
. $incdir/test_functions.sh
@@ -24,7 +26,7 @@ test_noninteractive_no_prompt()
prompt="smb"
echo du | \
- $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp 2>&1 | \
+ $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I SERVER_IP $ADDARGS 2>&1 | \
grep $prompt
if [ $? = 0 ] ; then
@@ -48,8 +50,8 @@ quit
EOF
CLI_FORCE_INTERACTIVE=yes \
- $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp \
- < $tmpfile 2>/dev/null | \
+ $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP \
+ $ADDARGS < $tmpfile 2>/dev/null | \
grep $prompt
if [ $? = 0 ] ; then
@@ -64,7 +66,7 @@ EOF
}
testit "smbclient -L $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
-testit "smbclient -L $SERVER" $SMBCLIENT $CONFIGURATION -L $SERVER -N -p 139 || failed=`expr $failed + 1`
+testit "smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER -I $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
testit "noninteractive smbclient does not prompt" \
test_noninteractive_no_prompt || \
diff --git a/source3/script/tests/test_smbtorture_s3.sh b/source3/script/tests/test_smbtorture_s3.sh
index f662eacd3e..acb641b9fb 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -42,7 +42,7 @@ for t in $tests; do
fi
start=""
name="$t"
- testit "$name" $VALGRIND $BINDIR/smbtorture $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
+ testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" $ADDARGS $t || failed=`expr $failed + 1`
done
testok $0 $failed
diff --git a/source3/script/tests/tests_all.sh b/source3/script/tests/tests_all.sh
index 12789aa926..2edc025017 100755
--- a/source3/script/tests/tests_all.sh
+++ b/source3/script/tests/tests_all.sh
@@ -1,9 +1,16 @@
$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 + $?`
+LD_LIBRARY_PATH="$SAMBA4SHAREDDIR:$LD_LIBRARY_PATH"
+echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH
SMBTORTURE4VERSION=`$SMBTORTURE4 --version`
if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
echo "Running Tests with Samba4's smbtorture"