summaryrefslogtreecommitdiffstats
path: root/tools/regression/atm/Funcs.sh
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2004-01-29 16:01:57 +0000
committerharti <harti@FreeBSD.org>2004-01-29 16:01:57 +0000
commitfad6079588e109e2c9f179a2a087db43be277b02 (patch)
treecac0973a6094677902dc155f1ca78a332e5bb4ce /tools/regression/atm/Funcs.sh
parent7dac4543ee8f303b86dcc2501f1f55f0c0b96a55 (diff)
downloadFreeBSD-src-fad6079588e109e2c9f179a2a087db43be277b02.zip
FreeBSD-src-fad6079588e109e2c9f179a2a087db43be277b02.tar.gz
These scripts run the protocol test suites for the SSCOP, SSCF-UNI and
UNI protocols. The actual test suites are not in these directories because of their size. One needs to install the atmsupport port (the script will remind you, if it cannot find the port). The SSCOP test suite includes booth the ETSI and the ITU-T test suite, the SSCF-UNI test suite is home grown and the UNI test suite is the P2MP ETSI test suite. Others may follow.
Diffstat (limited to 'tools/regression/atm/Funcs.sh')
-rw-r--r--tools/regression/atm/Funcs.sh53
1 files changed, 53 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
+}
OpenPOWER on IntegriCloud