source: trunk/server/source4/utils/tests/test_nmblookup.sh

Last change on this file was 414, checked in by Herwig Bauernfeind, 16 years ago

Samba 3.5.0: Initial import

File size: 953 bytes
Line 
1#!/bin/sh
2# Blackbox tests for nmblookup
3
4NETBIOSNAME=$1
5NETBIOSALIAS=$2
6SERVER=$3
7SERVER_IP=$4
8shift 4
9TORTURE_OPTIONS=$*
10
11failed=0
12
13testit() {
14 name="$1"
15 shift
16 cmdline="$*"
17 echo "test: $name"
18 $cmdline
19 status=$?
20 if [ x$status = x0 ]; then
21 echo "success: $name"
22 else
23 echo "failure: $name"
24 failed=`expr $failed + 1`
25 fi
26 return $status
27}
28
29samba4bindir="$BUILDDIR/bin"
30nmblookup="$samba4bindir/nmblookup$EXEEXT"
31
32testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER
33testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME
34testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
35testit "nmblookup \$SERVER" $nmblookup $TORTURE_OPTIONS $SERVER
36testit "nmblookup \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS $NETBIOSNAME
37testit "nmblookup \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
38
39exit $failed
Note: See TracBrowser for help on using the repository browser.