summaryrefslogtreecommitdiffstats
path: root/bin/runtest
diff options
context:
space:
mode:
authorHDF Tester <hdftest@hdfgroup.org>2008-03-04 21:59:37 (GMT)
committerHDF Tester <hdftest@hdfgroup.org>2008-03-04 21:59:37 (GMT)
commit21ddbe660998f1ad04eebd26f0547c3d6cb55dd8 (patch)
tree2ecff434442d9fe4375a0b1d62d09a74ff784bf4 /bin/runtest
parent4de5549f92e354900b47585d2a76c213984504b3 (diff)
downloadhdf5-21ddbe660998f1ad04eebd26f0547c3d6cb55dd8.zip
hdf5-21ddbe660998f1ad04eebd26f0547c3d6cb55dd8.tar.gz
hdf5-21ddbe660998f1ad04eebd26f0547c3d6cb55dd8.tar.bz2
[svn-r14704] TIMELIMIT_PARSE altered to return timelimit value.
Diffstat (limited to 'bin/runtest')
-rwxr-xr-xbin/runtest32
1 files changed, 30 insertions, 2 deletions
diff --git a/bin/runtest b/bin/runtest
index 34386e4..9430932 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -419,6 +419,34 @@ RUNSNAPTEST()
fi
}
+TIMELIMIT_PARSE()
+{
+ # Function returns timeparam for timekeeper via standard out -
+ # any debug statements should be 'echo "Debug string" >&2' or timekeeper
+ # will declare timeparam to be non-numeric and ignore it.
+ while read x y ; do
+ # Scan for entry for this weekday.
+ xd=`echo $x | cut -f1 -d/`
+ if [ "$xd" = ${WEEKDAY} ]; then
+ # strip away the weekday/ part.
+ timeparam=`echo $x | cut -f2 -d/`
+ break
+ fi
+ case "$x" in
+ '' | '#'*)
+ # blank or comment lines. Continue.
+ ;;
+ ???/*)
+ # Ignore any entry not of this weekday.
+ ;;
+ *)
+ timeparam="$x"
+ ;;
+ esac
+ done
+ echo $timeparam
+ return
+}
# configuration parsing.
# Taking configuration from input.
@@ -561,7 +589,7 @@ errcode=0 # error code of the whole test
skiptest=no # if test is skipped
CC_SAVED="$CC" # CC & PATH maybe changed within a test.
PATH_SAVED=$PATH # These save the original values.
-timelimit=300 # time limit (minutes) for the timekeeper
+timelimit=300 # default time limit (minutes) for the timekeeper
#################################
# Parse options
@@ -847,7 +875,7 @@ if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then
cd ${SNAPYARD}/log
# Fork off timekeeper if concurrent tests will be used.
if [ -n "$SRCDIR" ]; then
- timelimit=`grep -v '^#' $TIMELIMIT`
+ timelimit=$(TIMELIMIT_PARSE < $TIMELIMIT)
($SNAPYARD/current/bin/timekeeper $timelimit > $TIMEKEEPERLOG 2>&1 &)
PRINT " Fork off timekeeper $timelimit"
fi