source: trunk/server/source3/script/tests/test_net_misc.sh

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 1.0 KB
Line 
1#!/bin/sh
2
3# various tests for the "net" command
4
5if [ $# -lt 3 ]; then
6cat <<EOF
7Usage: test_net_misc.sh SCRIPTDIR SERVERCONFFILE CONFIGURATION
8EOF
9exit 1;
10fi
11
12SCRIPTDIR="$1"
13SERVERCONFFILE="$2"
14CONFIGURATION="$3"
15
16NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
17
18NETTIME="${NET} time"
19NETLOOKUP="${NET} lookup"
20
21test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
22incdir=`dirname $0`/../../../testprogs/blackbox
23. $incdir/subunit.sh
24}
25
26failed=0
27
28test_time()
29{
30 PARAM="$1"
31
32 ${NETTIME} -S ${SERVER} ${PARAM}
33}
34
35test_lookup()
36{
37 PARAM="$1"
38
39 ${NETLOOKUP} ${PARAM}
40}
41
42testit "get the time" \
43 test_time || \
44 failed=`expr $failed + 1`
45
46testit "get the system time" \
47 test_time system || \
48 failed=`expr $failed + 1`
49
50testit "get the time zone" \
51 test_time zone || \
52 failed=`expr $failed + 1`
53
54testit "lookup the PDC" \
55 test_lookup pdc || \
56 failed=`expr $failed + 1`
57
58testit "lookup the master browser" \
59 test_lookup master || \
60 failed=`expr $failed + 1`
61
62testok $0 $failed
63
Note: See TracBrowser for help on using the repository browser.