summaryrefslogtreecommitdiff
path: root/testing/rfc1213/run
blob: e07a7af252f83a887b19a61cdcc5dbc2b5e2a147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash

cd `dirname $0`

PATH=..:$PATH

. ../eval_tools.sh

. test_fun
. snmpfun.sh

SNMP_SLEEP=${SNMP_SLEEP:-"1"}
SNMP_VERBOSE=${SNMP_VERBOSE:-"0"}

trap "STOPAGENT; DELAY; summary; exit 1" 1 2 3 9 15 19

if [ -z "$1" ] ; then
    LIST="testmib1.sh testmib2.sh testmib3.sh"
    MULTI="yes"
else
    LIST=testmib${1}.sh
fi

for f in $LIST
do
    if [ -n "$MULTI" ] ; then
	echo         ## start next in series on new line
    fi
    if [ $SNMP_VERBOSE -ne 0 ] ; then
	echo "run test in $f"
    fi

    . $f
    dperline=0

    for ic in $iclist
    do
        eval tplist=\"\$$ic\"
        for tp in $tplist
        do	
            $tp
        done
    done

    STOPAGENT
    DELAY
done

summary

if [ $fail_num -ne 0 ] ; then
    RC=1
else
    RC=0
fi

exit $RC