and added files
[bcm963xx.git] / userapps / opensource / net-snmp / testing / eval_onescript.sh
1 #!/bin/sh
2 #
3 # eval_onescript.sh SCRIPT  [TESTNUMBER [HEADERONLY] ]
4 #
5 # Evaluates one test program, and helps it out by doing a bit of setup
6 # for it.  It does this by sourcing some configuration files for it
7 # first, and if it exited without calling FINISHED, call it.
8 #
9 # Not intended to be a tool for the common user!  Called by RUNTESTS
10 # directly instead.
11 #
12
13 testnum=1
14 if [ "x$2" != "x" ]; then
15         testnum=$2
16 fi
17 export testnum
18
19 unset SNMP_HEADERONLY
20 if [ "x$3" = "xyes" ]; then
21     SNMP_HEADERONLY=yes
22 fi
23 export SNMP_HEADERONLY
24
25 . TESTCONF.sh
26
27 . eval_tools.sh
28
29 ECHO "$testnum:  "
30
31 . ./$1
32
33 # We shouldn't get here...
34 # If we do, it means they didn't exit properly.
35 # So we will.
36 STOPAGENT      # Just in case.
37 FINISHED