1#!/bin/sh 2# Blackbox tests for testing against windows machines 3# Copyright (C) 2008 Jim McDonough 4 5 6testwithconf() { 7# define test variables, startup/shutdown scripts 8. $1 9shift 1 10 11if [ -n "$WINTEST_STARTUP" ]; then 12. $WINTEST_STARTUP; 13fi 14 15testit "smbtorture" $smbtorture //$SERVER/$SHARE RAW-OPEN -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1` 16 17if [ -n "$WINTEST_SHUTDOWN" ]; then 18. $WINTEST_SHUTDOWN; 19fi 20} 21 22 23# main 24# skip without WINTEST_CONF_DIR 25if [ -z "$WINTEST_CONF_DIR" ]; then 26exit 0; 27fi 28 29SOCKET_WRAPPER_DIR= 30export -n SOCKET_WRAPPER_DIR 31 32failed=0 33 34$basedir=`pwd` 35 36samba4bindir=`dirname $0`/../../source4/bin 37smbtorture=$samba4bindir/smbtorture 38 39. `dirname $0`/subunit.sh 40 41for wintest_conf in $WINTEST_CONF_DIR/*.conf; do 42testwithconf "$wintest_conf" $@; 43done 44 45exit $failed 46