summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-07-21 20:15:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-07-21 20:15:59 (GMT)
commitfd476c92c5c6612bf5a0fc7f86b7ade54d948f21 (patch)
treeb92b3c5d80d56818d63e99e69f5d453d8850c284
parent140dfae48a286c2f2a185594ceb49d4c61aa6465 (diff)
downloadhdf5-fd476c92c5c6612bf5a0fc7f86b7ade54d948f21.zip
hdf5-fd476c92c5c6612bf5a0fc7f86b7ade54d948f21.tar.gz
hdf5-fd476c92c5c6612bf5a0fc7f86b7ade54d948f21.tar.bz2
[svn-r8913] Purpose:
Bug fix and feature. Description: The setenv was done in runtest but it has the effect will linger onto the next test. So, if the first test sets $CXX to a certain value, it lingers on the all following tests of the same host. This is usually not desired. Solution: Move the actual setenv code to snapshot. Runtest now just parses them and pass along the setenv request to snapshot. Platforms tested: no h5comittest which does not really test the change. Hand tested in eirene with Tg-NCSA. Misc. update:
-rwxr-xr-xbin/runtest16
-rwxr-xr-xbin/snapshot30
2 files changed, 38 insertions, 8 deletions
diff --git a/bin/runtest b/bin/runtest
index f333eb2..9382c54 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -304,29 +304,27 @@ RUNSNAPTEST()
SNAPCMD_OPT="$SNAPCMD_OPT $1"
;;
setenv)
- # set environment variable
+ # pass them along to snapshot set environment variable
shift
- eval $1="$2"
- export $1
+ SNAPCMD_OPT="$SNAPCMD_OPT setenv $1 $2"
shift
;;
setenvN)
# set environment variable with $1 values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
- # a kludge now--the extra single quotes are needed
- # else eval complains.
+ # pass them along to snapshot set environment variable
shift
envN=$1
shift
envname=$1
+ SNAPCMD_OPT="$SNAPCMD_OPT setenvN $envN $envname"
envalue=
while test $envN -gt 0; do
shift
envalue="$envalue $1"
envN=`expr $envN - 1`
done
- eval $envname="'$envalue'"
- export $envname
+ SNAPCMD_OPT="$SNAPCMD_OPT $envalue"
;;
skip)
# skip this test
@@ -409,9 +407,11 @@ RUNSNAPTEST()
# op-snapshot <option> snapshot option
# --* configure option
# setenv <name> <value> set environment variable <name> to <value>
-# setenvN) <N> <name> <value> ...
+# Pass along to snapshot
+# setenvN <N> <name> <value> ...
# set environment variable with <N> values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
+# Pass along to snapshot.
# skip skip this test
# srcdirname <name> use <name> as the build-directory.
SNAPTEST_CONFIG_PARSE()
diff --git a/bin/snapshot b/bin/snapshot
index b57f5ed..6be29be 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -86,6 +86,31 @@ while [ $# -gt 0 ] ; do
cmdtest="test"
cmd=""
;;
+ setenv)
+ # set environment variable
+ shift
+ eval $1="$2"
+ export $1
+ shift
+ ;;
+ setenvN)
+ # set environment variable with $1 values
+ # e.g., setenvN 3 x a b c is same as setenv x="a b c".
+ # a kludge now--the extra single quotes are needed
+ # else eval complains.
+ shift
+ envN=$1
+ shift
+ envname=$1
+ envalue=
+ while test $envN -gt 0; do
+ shift
+ envalue="$envalue $1"
+ envN=`expr $envN - 1`
+ done
+ eval $envname="'$envalue'"
+ export $envname
+ ;;
srcdir)
#use srcdir option for test
srcdir="yes"
@@ -174,6 +199,11 @@ Usage: $PROGNAME [all] [checkout] [diff] [test] [srcdir] [release] [help]
release: Run release
clean: Run make clean
distclean:Run make distclean
+ setenv <name> <value>:
+ Set environment variable <name> to <value>.
+ setenvN <N> <name> <value> ...:
+ Set environment variable with <N> values.
+ E.g., setenvN 3 x a b c is same as setenv x="a b c".
srcdir: Use srcdir option (does not imply other commands)
"snapshot srcdir" is equivalent to "snapshot srcdir all"
"snapshot srcdir checkout" is equivalent to "snapshot checkout"