mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r24706: Move nmblookup tests to separate blackbox testsuite.
This commit is contained in:
parent
10f266e4d6
commit
aeb2e714f2
@ -16,6 +16,10 @@ ADDARGS="$*"
|
||||
incdir=`dirname $0`
|
||||
. $incdir/test_functions.sh
|
||||
|
||||
plantest "blackbox.smbclient" dc $incdir/../../testprogs/blackbox/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.kinit" dc $incdir/../../testprogs/blackbox/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.cifsdd" dc $incdir/../../testprogs/blackbox/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
bbdir=$incdir/../../testprogs/blackbox
|
||||
|
||||
plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
plantest "blackbox.nmblookup:dc" dc $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" $ADDARGS
|
||||
plantest "blackbox.nmblookup:member" member $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" $ADDARGS
|
||||
|
@ -12,13 +12,6 @@ if test x"$TEST_NBT_ENVNAME" = x"";then
|
||||
TEST_NBT_ENVNAME="dc"
|
||||
fi
|
||||
|
||||
plantest "nmblookup -U \$SERVER_IP \$SERVER" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS -U \$SERVER_IP \$SERVER
|
||||
plantest "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS -U \$SERVER_IP \$NETBIOSNAME
|
||||
plantest "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS -U \$SERVER_IP \$NETBIOSALIAS
|
||||
plantest "nmblookup \$SERVER" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS \$SERVER
|
||||
plantest "nmblookup \$NETBIOSNAME" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS \$NETBIOSNAME
|
||||
plantest "nmblookup \$NETBIOSALIAS" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS \$NETBIOSALIAS
|
||||
|
||||
NBT_TESTS=`bin/smbtorture --list | grep "^NBT-" | xargs`
|
||||
|
||||
if test x"$TEST_NBT_ENVNAME" = x"dc";then
|
||||
|
36
testprogs/blackbox/test_nmblookup.sh
Executable file
36
testprogs/blackbox/test_nmblookup.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user