File: run

package info (click to toggle)
net-snmp 5.2.3-7etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 24,452 kB
  • ctags: 16,045
  • sloc: ansic: 175,930; perl: 11,814; sh: 11,230; makefile: 5,375; pascal: 62
file content (58 lines) | stat: -rwxr-xr-x 778 bytes parent folder | download | duplicates (15)
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