r7758: When not running on the build farm, print out the failed command line again.
[Samba/ekacnet.git] / source4 / script / tests / test_echo.sh
blob3b6c2d286dc453d9457fac2ed7f9e4023324216a
1 #!/bin/sh
3 if [ $# -lt 4 ]; then
4 cat <<EOF
5 Usage: test_echo.sh SERVER USERNAME PASSWORD DOMAIN
6 EOF
7 exit 1;
8 fi
10 server="$1"
11 username="$2"
12 password="$3"
13 domain="$4"
14 shift 4
16 incdir=`dirname $0`
17 . $incdir/test_functions.sh
19 transports="ncacn_np ncacn_ip_tcp"
20 if [ $server = "localhost" ]; then
21 transports="ncalrpc $transports"
24 failed=0
25 for transport in $transports; do
26 for bindoptions in connect sign seal sign,seal validate padcheck bigendian bigendian,seal; do
27 for ntlmoptions in \
28 "--option=socket:testnonblock=True --option=torture:echo_TestSleep=no" \
29 "--option=ntlmssp_client:ntlm2=yes --option=torture:echo_TestSleep=no" \
30 "--option=ntlmssp_client:ntlm2=no --option=torture:echo_TestSleep=no" \
31 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:echo_TestSleep=no" \
32 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:echo_TestSleep=no" \
33 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:echo_TestSleep=no" \
34 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:echo_TestSleep=no" \
35 "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:echo_TestSleep=no" \
36 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:echo_TestSleep=no" \
37 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:echo_TestSleep=no" \
38 ; do
39 name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions"
40 testit "$name" bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*" || failed=`expr $failed + 1`
41 done
42 done
43 done
45 # separately test the print option - its v slow
46 name="RPC-ECHO with print option"
47 testit "$name" bin/smbtorture $TORTURE_OPTIONS ncacn_np:"$server[print]" -U"$username"%"$password" -W $domain RPC-ECHO "$*" || failed=`expr $failed + 1`
49 testok $0 $failed