diff --git a/tools/regression/atm/Funcs.sh b/tools/regression/atm/Funcs.sh new file mode 100644 index 000000000000..c981f101df94 --- /dev/null +++ b/tools/regression/atm/Funcs.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# $FreeBSD$ + +fatal() { + echo -e "$*" >&2 + exit 1 +} + +msg() { + echo -e "$*" >&2 +} + +usage1() { + msg "Usage: RunTest.sh [-hq] [-b ]" + msg "Options:" + msg " -h show this info" + msg " -b localbase if not /usr/local" + msg " -q be quite" + msg " -u run user space test, not kernel" + exit 0 +} + +parse_options() { + args=`getopt b:hqu $*` + if [ $? -ne 0 ] ; then + fatal "Usage: $0 [-qu] [-b ]" + fi + + options="" + set -- $args + for i + do + case "$i" + in + + -h) usage1;; + -u|-q) options="$options $i"; shift;; + -b) LOCALBASE="$2"; shift; shift;; + --) shift; break;; + esac + done + + if [ "$LOCALBASE" = "" ] ; then + LOCALBASE="/usr/local" + + pkg_info -I atmsupport-\* 2>/dev/null >/dev/null + if [ $? -ne 0 ] ; then + fatal "Atmsupport package not installed. \ +Goto /usr/ports/net/atmsupport,\ntype 'make ; make install ; make clean' \ +and re-run this script" + fi + fi +} diff --git a/tools/regression/atm/README b/tools/regression/atm/README new file mode 100644 index 000000000000..51403bd6c65e --- /dev/null +++ b/tools/regression/atm/README @@ -0,0 +1,16 @@ +$FreeBSD$ + +This directory contains tests for the ATM stuff. Specific tests for HARP +are in the harp subdirectory and are not automatically run. All +other tests can be run from the top-level or from their sub-directories by +starting RunTest.sh. + +These tests require ports/net/atmsupport to be installed - the +scripts will remind you if they cannot find the package. + +harp HARP tests +proto_sscfu test suite for the SSCF at the user interface +proto_sscop test suite for the SSCOP protocol +proto_uni test suite for the UNI protocol + +harti@freebsd.org diff --git a/tools/regression/atm/RunTest.sh b/tools/regression/atm/RunTest.sh new file mode 100644 index 000000000000..ab34104cbec0 --- /dev/null +++ b/tools/regression/atm/RunTest.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# $FreeBSD$ + +. ./Funcs.sh + +# +# Just check the legality of the options and pass them along +# +args=`getopt b:hq $*` +if [ $? -ne 0 ] ; then + fatal "Usage: $0 [-q] [-b ]" +fi + +usage() { + msg "Usage: RunTest.sh [-hq] [-b ]" + msg "Options:" + msg " -h show this info" + msg " -b localbase if not /usr/local" + msg " -q be quite" + exit 0 +} + +options="" +set -- $args +for i +do + case "$i" + in + + -h) usage;; + -b) options="$options $i $2" ; shift; shift;; + -q) options="$options $i" ; shift;; + --) shift; break;; + esac +done + +(cd proto_uni ; ./RunTest.sh -u $options) +(cd proto_sscop ; ./RunTest.sh -u $options) +(cd proto_sscfu ; ./RunTest.sh -u $options) + +(cd proto_uni ; ./RunTest.sh $options) +(cd proto_sscop ; ./RunTest.sh $options) +(cd proto_sscfu ; ./RunTest.sh $options) diff --git a/tools/regression/atm/proto_sscfu/RunTest.sh b/tools/regression/atm/proto_sscfu/RunTest.sh new file mode 100644 index 000000000000..2f0865937224 --- /dev/null +++ b/tools/regression/atm/proto_sscfu/RunTest.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# $FreeBSD$ + +. ../Funcs.sh + +parse_options $* + +DATA=$LOCALBASE/share/atmsupport/testsuite_sscfu + +$LOCALBASE/bin/ats_sscfu $options $DATA/Funcs $DATA/EST* $DATA/REL* \ +$DATA/REC* $DATA/RES* $DATA/DATA* $DATA/UDATA* diff --git a/tools/regression/atm/proto_sscop/RunTest.sh b/tools/regression/atm/proto_sscop/RunTest.sh new file mode 100644 index 000000000000..60812deeb6ed --- /dev/null +++ b/tools/regression/atm/proto_sscop/RunTest.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +. ../Funcs.sh + +parse_options $* + +DATA=$LOCALBASE/share/atmsupport/testsuite_sscop + +$LOCALBASE/bin/ats_sscop $options $DATA/Funcs $DATA/S* diff --git a/tools/regression/atm/proto_uni/RunTest.sh b/tools/regression/atm/proto_uni/RunTest.sh new file mode 100644 index 000000000000..8b9c9e5e38c9 --- /dev/null +++ b/tools/regression/atm/proto_uni/RunTest.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# $FreeBSD$ + +. ../Funcs.sh + +parse_options $* + +DATA=$LOCALBASE/share/atmsupport/testsuite_uni + +$LOCALBASE/bin/ats_sig $options $DATA/Funcs $DATA/L3MU_Funcs $DATA/Restart.??? \ + $DATA/Unknown.??? $DATA/Incoming.??? $DATA/MpOut.??? $DATA/MpIn.??? \ + $DATA/L???_??_??