diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-09 17:17:21 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-09 17:17:21 +0100 |
commit | b5bfabf1526f094942f986f8c8f7019b64db6c2f (patch) | |
tree | 78763fa44e9b3e45eb4d79851845a420bd25c7e6 /source4 | |
parent | c8c9d70221b5d5b5e58ebb306911aa2f9b6ac2a6 (diff) | |
download | samba-b5bfabf1526f094942f986f8c8f7019b64db6c2f.tar.gz samba-b5bfabf1526f094942f986f8c8f7019b64db6c2f.tar.bz2 samba-b5bfabf1526f094942f986f8c8f7019b64db6c2f.zip |
Move nmblookup blackbox test closer to the code it tests.
(This used to be commit 3f24136b56d281580410bf69841c6dece5508d17)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/selftest/samba4_tests.sh | 4 | ||||
-rwxr-xr-x | source4/utils/tests/test_nmblookup.sh | 36 |
2 files changed, 38 insertions, 2 deletions
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh index d00b492953..c2ce9dc6f1 100755 --- a/source4/selftest/samba4_tests.sh +++ b/source4/selftest/samba4_tests.sh @@ -251,8 +251,8 @@ bbdir=$incdir/../../testprogs/blackbox plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" -plantest "blackbox.nmblookup" dc $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" -plantest "blackbox.nmblookup" member $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" +plantest "blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" +plantest "blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" # Tests using the "Simple" NTVFS backend diff --git a/source4/utils/tests/test_nmblookup.sh b/source4/utils/tests/test_nmblookup.sh new file mode 100755 index 0000000000..ad9b3ba799 --- /dev/null +++ b/source4/utils/tests/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 |