diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-27 14:36:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:52 -0500 |
commit | a73a8d4b9d09b5bb98b58f23196bd44263158cde (patch) | |
tree | 5ed66b47c4e0b42b295edcee5d379e9eb73ee897 /testprogs/blackbox | |
parent | bcfef9f04b694d38130beaf6184db7064132c9f3 (diff) | |
download | samba-a73a8d4b9d09b5bb98b58f23196bd44263158cde.tar.gz samba-a73a8d4b9d09b5bb98b58f23196bd44263158cde.tar.bz2 samba-a73a8d4b9d09b5bb98b58f23196bd44263158cde.zip |
r24706: Move nmblookup tests to separate blackbox testsuite.
(This used to be commit aeb2e714f22abe68f89218967a55d7abd2d04ae1)
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-x | testprogs/blackbox/test_nmblookup.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_nmblookup.sh b/testprogs/blackbox/test_nmblookup.sh new file mode 100755 index 0000000000..ad9b3ba799 --- /dev/null +++ b/testprogs/blackbox/test_nmblookup.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Blackbox tests for nmblookup + +NETBIOSNAME=$1 +NETBIOSALIAS=$2 +SERVER=$3 +SERVER_IP=$4 +shift 4 +TORTURE_OPTIONS=$* + +failed=0 + +testit() { + name="$1" + shift + cmdline="$*" + echo "test: $name" + $cmdline + status=$? + if [ x$status = x0 ]; then + echo "success: $name" + else + echo "failure: $name" + failed=`expr $failed + 1` + fi + return $status +} + +testit "nmblookup -U \$SERVER_IP \$SERVER" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER +testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME +testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS +testit "nmblookup \$SERVER" bin/nmblookup $TORTURE_OPTIONS $SERVER +testit "nmblookup \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS $NETBIOSNAME +testit "nmblookup \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS $NETBIOSALIAS + +exit $failed |