summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/regression/atm/Funcs.sh53
-rw-r--r--tools/regression/atm/README16
-rw-r--r--tools/regression/atm/RunTest.sh43
-rw-r--r--tools/regression/atm/proto_sscfu/RunTest.sh11
-rw-r--r--tools/regression/atm/proto_sscop/RunTest.sh10
-rw-r--r--tools/regression/atm/proto_uni/RunTest.sh12
6 files changed, 145 insertions, 0 deletions
diff --git a/tools/regression/atm/Funcs.sh b/tools/regression/atm/Funcs.sh
new file mode 100644
index 0000000..c981f10
--- /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 <localbase>]"
+ msg "Options:"
+ msg " -h show this info"
+ msg " -b <localbase> 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 <localbase>]"
+ 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 0000000..51403bd
--- /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 0000000..ab34104
--- /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 <localbase>]"
+fi
+
+usage() {
+ msg "Usage: RunTest.sh [-hq] [-b <localbase>]"
+ msg "Options:"
+ msg " -h show this info"
+ msg " -b <localbase> 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 0000000..2f08659
--- /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 0000000..60812de
--- /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 0000000..8b9c9e5
--- /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???_??_??
OpenPOWER on IntegriCloud