diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-10-02 20:47:05 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-10-02 20:47:05 (GMT) |
commit | 2fda38ead08a5f3a70c627c4d02742f3d025d954 (patch) | |
tree | be06a028595eeddd944a459f15ffed8ad3673e07 /bin | |
parent | bac55034d815df3cfb1b1d69999f9f6585d8419c (diff) | |
download | hdf5-2fda38ead08a5f3a70c627c4d02742f3d025d954.zip hdf5-2fda38ead08a5f3a70c627c4d02742f3d025d954.tar.gz hdf5-2fda38ead08a5f3a70c627c4d02742f3d025d954.tar.bz2 |
[svn-r4513] Purpose:
feature
Description:
Recognize command line argument in the form of '--*' as
a configure command option by default. Since all normal
configure options are in the form of '--*', this will
simplify the "op-configure <option>" syntax. The latter
syntax is still kept in case one would want to pass in
some configure argument that does not fit this syntax.
Platforms tested:
Eirene.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/runtest | 46 | ||||
-rwxr-xr-x | bin/snapshot | 9 |
2 files changed, 37 insertions, 18 deletions
diff --git a/bin/runtest b/bin/runtest index 0c94865..01df332 100755 --- a/bin/runtest +++ b/bin/runtest @@ -40,8 +40,8 @@ SRCDIR="srcdir" SNAPCMD="$SRCDIR test clean" # Default Standard snaptest command options STANDARD_OPT="" -ENABLE_PARALLEL="op-configure --enable-parallel" -#SNAPCMD="$SRCDIR op-configure --enable-stream-vfd op-configure --enable-static-exec test clean" +ENABLE_PARALLEL="--enable-parallel" +#SNAPCMD="$SRCDIR --enable-stream-vfd --enable-static-exec test clean" #*************** # Various hosts @@ -288,41 +288,43 @@ RUNSNAPTEST() PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***" PRINT "Uname -a: `uname -a`" - # parse the test type and set options accordingly + # Parse the test type and set options accordingly. + # See comments of SNAPTEST_CONFIG_PARSE(). while [ $# -gt 0 ]; do case $1 in -n32) # want -n32 option SRCDIRNAME=${SRCDIRNAME}-n32 CC="cc -n32" export CC - shift ;; parallel) # want parallel test SNAPCMD_OPT="$SNAPCMD_OPT $ENABLE_PARALLEL" SRCDIRNAME=${SRCDIRNAME}-pp - shift ;; standard) # standard test - shift + ;; + --*) + # option for configure + SNAPCMD_OPT="$SNAPCMD_OPT $1" ;; op-configure) # option for configure SNAPCMD_OPT="$SNAPCMD_OPT $1 $2" - shift; shift + shift ;; setenv) # set environment variable shift eval $1="$2" export $1 - shift; shift + shift ;; *) # unknown test PRINT "$0: unknown type of test ($1)" retcode=1 - shift ;; esac + shift done [ $retcode -ne 0 ] && errcode=$retcode && return $retcode @@ -366,14 +368,24 @@ RUNSNAPTEST() # Taking configuration from input. # This should be invoke with configure file as stdin. # Syntax of the configure file: -# All lines started with the # are comment lines and are ignored. -# standard ... # what the standard configure options are. -# type of tests for individual host. -# <host>: <test> Do <test> for <host> -# all: <test> Do <test> for all hosts. -# <weekday>/... Use this configure if the <weekday> matches. -# <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun} -# If no <host>: input for a <host>, the standard test is assumed. +# All lines started with the # are comment lines and are ignored. +# Each line starts with a "Scope" followed by test types. +# +# Scope can be: +# standard ... # what the standard test types are. +# <host>: <test> Do <test> for <host> +# all: <test> Do <test> for all hosts. +# <weekday>/... Use this scope if the <weekday> matches. +# <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun} +# If no <host>: input for a <host>, the standard test is used. +# +# Test types: +# standard tests defined in standard scope. +# -n32 -n32 mode. Apply to 64/32 bit OS such as IRIX64. +# parallel parallel mode. +# op-configure <option> configure option +# --* configure option +# setenv <name> <value> set environment variable <name> to <value> SNAPTEST_CONFIG_PARSE() { while read x y ; do diff --git a/bin/snapshot b/bin/snapshot index 02d3b83..4a5d668 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -102,6 +102,9 @@ while [ $# -gt 0 ] ; do fi ARCHIVES="$1" ;; + --*) + OP_CONFIGURE="$OP_CONFIGURE $1" + ;; op-configure) shift if [ $# -lt 1 ]; then @@ -127,7 +130,7 @@ if [ "$cmd" = help ]; then cat <<EOF Usage: $0 [all] [checkout] [test] [srcdir] [release] [help] [hdf4 <hdf4lib_path>] [archive <arch_path>] [dir <dir>] - [op-configure <option>] + [op-configure <option>] [--<option>] all: Run all commands (checkout, test & release) [Default is all] checkout: Run cvs checkout @@ -154,6 +157,10 @@ Usage: $0 [all] [checkout] [test] [srcdir] [release] [help] Pass <option> to the configure command E.g., "snapshot op-configure --enable-parallel" configures for parallel mode + --<option>: + Pass --<option> to the configure command + E.g., "snapshot --enable-parallel" + configures for parallel mode EOF exit $errcode fi |