From 28c1d30212491f307447ed35e5998e42df055db8 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 5 Feb 2001 23:38:57 -0500 Subject: [svn-r3365] Purpose: Bug fix, feature, cleaning code Description: It could not find bin/locate_hdf5. Solution: Explicitedly use the bin/locate_hdf5 in the snapshots/current area. Also, added Usage page to be printed when -h(elp) is asked or when there is error in command option. Cleaned some old code no longer used. Platforms tested: eirene --- bin/runtest | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/bin/runtest b/bin/runtest index e9e8098..c582b25 100755 --- a/bin/runtest +++ b/bin/runtest @@ -24,10 +24,6 @@ WHEREAMI='pwd' # the name of this program PROGNAME=bin/runtest -# Email any errors to whom -TOWHOM=${DEBUGMODE:+acheng} -TOWHOM=${TOWHOM:-hdf5lib@ncsa.uiuc.edu} - # Setup HOSTNAME=`hostname | cut -f1 -d.` # no domain part H5DIR=$HOME/HDF5/v_1_3/hdf5 @@ -82,9 +78,6 @@ SUNHOST="arabica baldric" # solaris 2.6 and 2.7 # test directory. ssh does not work for it either. FREEBSDHOST="hawkwind" -# run both serial and parallel for PARALLELHOST -PARALLELHOST="modi4" - # set up default all hosts to test ALLHOSTS="$O2KHOST $SUNHOST $SGIHOST $HPHOST $LINUXHOST $DECHOST $FREEBSDHOST" @@ -237,7 +230,7 @@ RUNSNAPTEST() [ $retcode -ne 0 ] && errcode=$retcode && return $retcode # Track down the HDF4 software - ans=`bin/locate_hdf4` + ans=`$SNAPYARD/current/bin/locate_hdf4` H4_SW=`echo $ans | cut -f1 -d' '` H4_BIN=`echo $ans | cut -f2 -s -d' '` if [ -n "$H4_SW" ]; then @@ -277,14 +270,6 @@ RUNSNAPTEST() } -# Record a type of test requested. Separate new request from -# existing requests by a semicolon (;). -# $1 is the type of test requested -ADD_TEST_TYPE() -{ -echo TEST_TYPES=$TEST_TYPES -} - # configuration parsing. # Taking configuration from input. # This should be invoke with configure file as stdin. @@ -341,6 +326,27 @@ FLUSH_FILES() } +# Show usage page +USAGE() +{ +cat <] [-all] [ ...] + -h + print this help page + -r + do runtest for + -all + launch tests for all pre-defined testing hosts + + launch tests for + +-all and are contradictory and whichever is specified last, is +the one to take effect. If neither are given, do the test for the +local host. +EOF +} + + ################################# # Main ################################# @@ -356,6 +362,10 @@ errcode=0 # error code of the whole test ################################# while [ $# -gt 0 ]; do case "$1" in + -h) # help--show usage + USAGE + exit 0 + ;; -r*) # the version string has a leading _ but not for H5DIR name H5VER="$1" @@ -366,6 +376,11 @@ while [ $# -gt 0 ]; do -all) TESTHOST=$ALLHOSTS ;; + -*) # Unknow option + echo "Unknown option ($1)" + USAGE + exit 1 + ;; *) TESTHOST=$* break -- cgit v0.12