s3-selftest: Set path to bin/net and bin/wbinfo in command line to test scripts
[bbaumbach/samba-autobuild/.git] / source3 / script / tests / test_net_misc.sh
index 0a0636ac8a9b406ae4d5cd951edd4c7a809277be..566694be74b58fcd76732d55b03769b747391e53 100755 (executable)
@@ -2,13 +2,25 @@
 
 # various tests for the "net" command
 
+if [ $# -lt 3 ]; then
+cat <<EOF
+Usage: test_net_misc.sh SCRIPTDIR SERVERCONFFILE NET CONFIGURATION
+EOF
+exit 1;
+fi
+
+SCRIPTDIR="$1"
+SERVERCONFFILE="$2"
+NET="$3"
+CONFIGURATION="$4"
+
 NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
 
 NETTIME="${NET} time"
 NETLOOKUP="${NET} lookup"
 
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
 
 failed=0
 
@@ -16,7 +28,7 @@ test_time()
 {
        PARAM="$1"
 
-       ${NETTIME} ${PARAM} -S localhost2
+       ${NETTIME} -S ${SERVER} ${PARAM}
 }
 
 test_lookup()