summaryrefslogtreecommitdiffstats
path: root/testprogs
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2008-06-12 07:02:14 -0400
committerJim McDonough <jmcd@samba.org>2008-06-12 07:02:14 -0400
commit0410dcb32d772ee5022bd3bb507a5650ef6c5071 (patch)
tree99a646f2df3c2a62d83c5aefb0c3c24727f603f8 /testprogs
parentce9db767a0b9c73101e79ab29c14777d2ec64918 (diff)
downloadsamba-0410dcb32d772ee5022bd3bb507a5650ef6c5071.tar.gz
samba-0410dcb32d772ee5022bd3bb507a5650ef6c5071.tar.xz
samba-0410dcb32d772ee5022bd3bb507a5650ef6c5071.zip
Initial automated wintest.
Added a blackbox test which looks for $WINTEST_CONF_DIR, gets configuration vars from *.conf in that dir, disables smbwrapper, and runs RAW-OPEN torture test. Scripts are coming to startup/shutdown vm's. (This used to be commit 74a0a9bb54b2583dde7a5fbadd4d10858de12ee7)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/test_wintest.sh45
-rw-r--r--testprogs/blackbox/wintest/wintest.conf7
2 files changed, 52 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_wintest.sh b/testprogs/blackbox/test_wintest.sh
new file mode 100755
index 00000000000..8bbe4f2984d
--- /dev/null
+++ b/testprogs/blackbox/test_wintest.sh
@@ -0,0 +1,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`/../../source/bin
+smbtorture=$samba4bindir/smbtorture
+
+. `dirname $0`/subunit.sh
+
+for wintest_conf in $WINTEST_CONF_DIR/*.conf; do
+testwithconf "$wintest_conf" $@;
+done
+
+exit $failed
diff --git a/testprogs/blackbox/wintest/wintest.conf b/testprogs/blackbox/wintest/wintest.conf
new file mode 100644
index 00000000000..d52e6603183
--- /dev/null
+++ b/testprogs/blackbox/wintest/wintest.conf
@@ -0,0 +1,7 @@
+#export WINTEST_STARTUP=/tmp/blah
+#export WINTEST_SHUTDOWN=/tmp/blah2
+export DOMAIN="wait"
+export USERNAME="administrator"
+export PASSWORD="samba"
+export SERVER="192.168.213.161"
+export SHARE="c\$" \ No newline at end of file