4 echo "Usage: $0 [acknowledgement-agent]" > /dev/stderr
8 # add . to the path for testing.
11 # get a script for returning results to the testcase; its API is
12 # echo .... | SENDACK [XFAIL] <target>
19 TMP=/tmp/auto ;# root of temporary filespace
21 WF=${TMP}/wf ;# work files for tftp et al
22 LG=${TMP}/log ;# log files for individual tests
24 declare -i unique=0 ;# unique IDs for workfiles and logfiles
30 read -a ORDERS || { echo "FAIL: EOF on read" > /dev/stderr; exit 1; }
34 [ "xQUIT" == "x$1" ] && break
36 [ "xORDERS:" != "x$1" ] && \
37 { echo "No ORDERS tag" > /dev/stderr; continue; }
39 XFAIL=""; [ "xXFAIL" == "x$2" ] && { XFAIL="XFAIL"; shift; }
45 echo "test $TEST [$XFAIL]; target $TARGET; params ${PARAMS[@]}"
47 # Be robust against zealous GC of workfiles - as late as possible
48 # before we use them, it's in the read above that we sleep.
49 [ ! -d ${TMP} ] && mkdir ${TMP}
50 [ ! -d ${WF} ] && mkdir ${WF}
51 [ ! -d ${LG} ] && mkdir ${LG}
53 # Now the main switch that runs the test script: this is where
54 # new testcases are added:
58 tftpget.sh $XFAIL $TARGET $WF/tftpget.$unique ${PARAMS[@]} \
59 2>&1 >$LG/tftpget.$unique | $SENDACK $XFAIL $TARGET & ;;
62 tftpput.sh $XFAIL $TARGET $WF/tftpput.$unique ${PARAMS[@]} \
63 2>&1 >$LG/tftpput.$unique | $SENDACK $XFAIL $TARGET & ;;
66 slowping.sh $XFAIL $TARGET ${PARAMS[@]} \
67 2>&1 >$LG/slowping.$unique | $SENDACK $XFAIL $TARGET & ;;
70 floodping.sh $XFAIL $TARGET ${PARAMS[@]} \
71 2>&1 >$LG/floodping.$unique | $SENDACK $XFAIL $TARGET & ;;
74 snmpwalk.sh $XFAIL $TARGET ${PARAMS[@]} \
75 2>&1 >$LG/snmpwalk.$unique | $SENDACK $XFAIL $TARGET & ;;
77 *) echo "Unknown order $TEST" > /dev/stderr ;;