diff options
Diffstat (limited to 'testing/rfc1213/run')
-rwxr-xr-x | testing/rfc1213/run | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/rfc1213/run b/testing/rfc1213/run new file mode 100755 index 0000000..e07a7af --- /dev/null +++ b/testing/rfc1213/run @@ -0,0 +1,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 + |