r18026: patch from Brad allowing the windows testing to be configured
[bbaumbach/samba-autobuild/.git] / source4 / script / tests / tests_win.sh
1 #!/bin/sh
2
3  if [ `whoami` != "root" ]; then
4        echo "Windows tests will not run without root privilages."
5        exit 1
6  fi
7
8  if [ "$DO_SOCKET_WRAPPER" = SOCKET_WRAPPER ]; then
9        echo "Windows tests will not run with socket wrapper enabled."
10        exit 1
11  fi
12
13  if [ ! $WINTESTCONF ]; then
14         echo "Environment variable WINTESTCONF has not been defined."
15         echo "Windows tests will not run unconfigured."
16         exit 1
17  fi
18
19  if [ ! -r $WINTESTCONF ]; then
20        echo "$WINTESTCONF could not be read."
21        exit 1
22  fi
23
24  export WINTEST_DIR=$SRCDIR/script/tests/win
25  export TMPDIR=$TMPDIR
26  export NETBIOSNAME=$NETBIOSNAME
27
28  . $WINTESTCONF
29
30  $SRCDIR/script/tests/test_win.sh
31  status=$?
32
33  echo "$0 exits with status $status"
34  exit $status