summaryrefslogtreecommitdiff
path: root/testprogs/blackbox/test_wintest.sh
blob: f13e94b99f1e05883f0bbedac6e4aa1017c3ad79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# Blackbox tests for testing against windows machines
# Copyright (C) 2008 Jim McDonough


testwithconf() {
# define test variables, startup/shutdown scripts
. $1
shift 1

if [ -n "$WINTEST_STARTUP" ]; then
. $WINTEST_STARTUP;
fi

testit "smbtorture" $smbtorture //$SERVER/$SHARE RAW-OPEN -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`

if [ -n "$WINTEST_SHUTDOWN" ]; then
. $WINTEST_SHUTDOWN;
fi
}


# main
# skip without WINTEST_CONF_DIR
if [ -z "$WINTEST_CONF_DIR" ]; then
exit 0;
fi

SOCKET_WRAPPER_DIR=
export -n SOCKET_WRAPPER_DIR

failed=0

$basedir=`pwd`

samba4bindir=`dirname $0`/../../source4/bin
smbtorture=$samba4bindir/smbtorture

. `dirname $0`/subunit.sh

for wintest_conf in $WINTEST_CONF_DIR/*.conf; do
testwithconf "$wintest_conf" $@;
done

exit $failed