librpc: Shorten dcerpc_binding_handle_call a bit
[Samba/gebeck_regimport.git] / source4 / selftest / win / wintest_2k3_dc.sh
blobed964a274af8d57675014fd14a90e894df9375b5
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: wintest_2k3_dc.sh TESTGROUP
6 EOF
7 exit 1;
8 fi
10 TESTGROUP=$1
12 if [ -z $WINTEST_DIR ]; then
13 echo "Environment variable WINTEST_DIR not found."
14 exit 1;
17 # This variable is defined in the per-hosts .fns file for build-farm hosts that run windows tests.
18 if [ -z $WINTESTCONF ]; then
19 echo "Please point environment variable WINTESTCONF to your test_win.conf file."
20 exit 1;
23 . $WINTESTCONF
24 . $WINTEST_DIR/wintest_functions.sh
26 export WIN2K3_DC_REMOTE_HOST=`perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl WIN2K3_DC_VM_CFG_PATH`
28 if [ -z $WIN2K3_DC_REMOTE_HOST ]; then
29 # Restore snapshot to ensure VM is in a known state, then exit.
30 restore_snapshot "Test failed to get the IP address of the windows 2003 DC." "$WIN2K3_DC_VM_CFG_PATH"
31 exit 1;
34 server=$WIN2K3_DC_REMOTE_HOST
35 username=$WIN2K3_DC_USERNAME
36 password=$WIN2K3_DC_PASSWORD
37 domain=$WIN2K3_DC_DOMAIN
38 realm=$WIN2K3_DC_REALM
40 OPTIONS="-U$username%$password -W $domain --option realm=$realm"
42 all_errs=0
44 on_error() {
45 name=$1
47 all_errs=`expr $all_errs + 1`
48 restore_snapshot "$name test failed." "$WIN2K3_DC_VM_CFG_PATH"
51 drsuapi_tests() {
53 name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
54 bin/smbtorture \
55 ncacn_ip_tcp:$server[seal] $OPTIONS \
56 RPC-DRSUAPI || on_error "$name"
58 name="RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian"
59 bin/smbtorture \
60 ncacn_ip_tcp:$server[seal,bigendian] $OPTIONS \
61 RPC-DRSUAPI || on_error "$name"
64 spoolss_tests() {
66 name="RPC-SPOOLSS on ncacn_np"
67 bin/smbtorture \
68 ncacn_np:$server $OPTIONS \
69 RPC-SPOOLSS || on_error "$name"
72 ncacn_ip_tcp_tests() {
73 bindopt=$1
74 transport="ncacn_ip_tcp"
75 tests="RPC-SCHANNEL RPC-EPMAPPER RPC-SAMR RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND"
77 for bindoptions in $bindopt; do
78 for t in $tests; do
79 name="$t on $transport with $bindoptions"
80 bin/smbtorture $TORTURE_OPTIONS \
81 $transport:$server[$bindoptions] \
82 $OPTIONS $t || on_error "$name"
83 done
84 done
87 ncacn_np_tests() {
88 bindopt=$1
89 transport="ncacn_np"
90 tests="RPC-SCHANNEL RPC-DSSETUP RPC-EPMAPPER RPC-SAMR RPC-WKSSVC RPC-SRVSVC RPC-EVENTLOG RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND RPC-WINREG"
92 for bindoptions in $bindopt; do
93 for t in $tests; do
94 name="$t on $transport with $bindoptions"
95 bin/smbtorture $TORTURE_OPTIONS \
96 $transport:$server[$bindoptions] \
97 $OPTIONS $t || on_error "$name"
98 done
99 done
102 bindoptions="padcheck connect sign seal ntlm,sign ntml,seal $VALIDATE bigendian"
104 case $TESTGROUP in
105 RPC-DRSUAPI) drsuapi_tests ;;
106 RPC-SPOOLSS) spoolss_tests ;;
107 ncacn_ip_tcp) ncacn_ip_tcp_tests $bindoptions ;;
108 ncacn_np) ncacn_np_tests $bindoptions ;;
109 *) echo "$TESTGROUP is not a known set of tests."
110 exit 1;
112 esac
114 exit $all_errs