From a3c023c1438e42b50acb176682a8ed1cd924e5c7 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 5 Mar 2002 19:55:31 -0500 Subject: [svn-r5034] Purpose: New feature Description: Replacing the hardcoding of default version for snapshot test to a file, bin/snapshot_version. This way, runtest and snapshot can be version neutral. Makes maintenance easier. Platforms tested: eirene. --- bin/runtest | 24 +++++++++++++++++------- bin/snapshot | 7 ++++++- bin/snapshot_version | 6 ++++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 bin/snapshot_version diff --git a/bin/runtest b/bin/runtest index 01d5113..3447b10 100755 --- a/bin/runtest +++ b/bin/runtest @@ -25,11 +25,10 @@ PROGNAME="bin/runtest $DEBUGMODE" # Setup HOSTNAME=`hostname | cut -f1 -d.` # no domain part -H5DIR=$HOME/HDF5/v_1_5/hdf5 TODAY=`date +%y%m%d` WEEKDAY=`date +%a` H5VER= # default to current CVS version -H5VERSTR= # default to current CVS version +H5VERSION= # default to current CVS version # Default to do checkout (only once) and test, no release. # If srcdir is not used, don't launched multiple tests @@ -470,11 +469,8 @@ while [ $# -gt 0 ]; do PRINT "******** DEBUGMODE is $DEBUGMODE ************" ;; -r*) - # the version string has a leading _ but not for H5DIR name + # version string H5VER="$1" - H5VERSTR=_`echo $H5VER | sed -e s/-r// -e s/\\\./_/g` - H5DIR=$HOME/HDF5/v$H5VERSTR/hdf5 - PROGNAME="$PROGNAME $H5VER" ;; -all) # Test all hosts. @@ -497,11 +493,25 @@ while [ $# -gt 0 ]; do shift done +# setup H5VER if not set yet +if [ -z "$H5VER" -a -f bin/snapshot_version ] +then + . bin/snapshot_version +fi + +if [ -n "$H5VER" ] +then + H5VERSION=hdf5_`echo $H5VER | sed -e s/-r// -e s/\\\./_/g` + PROGNAME="$PROGNAME $H5VER" +else + H5VERSION=hdf5 +fi + ################################# # Setup snapshot test directories ################################# # Show the real physical path rather than the symbolic path -SNAPYARD=`cd $HOME/snapshots-hdf5${H5VERSTR} && /bin/pwd` +SNAPYARD=`cd $HOME/snapshots-${H5VERSION} && /bin/pwd` # Log file basename LOGBASENAME=${SNAPYARD}/log/${HOSTNAME} PASSEDLOG=${SNAPYARD}/log/PASSED_LOG_${TODAY} diff --git a/bin/snapshot b/bin/snapshot index c987682..a0b5fff 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -173,7 +173,12 @@ CONFIGURE="./configure $HDF4LIB $OP_CONFIGURE" # Execute the requests snapshot=yes -H5VERSION=hdf5 +if [ -f bin/snapshot_version ]; then + . bin/snapshot_version +else + H5VERSION=hdf5 +fi + BASEDIR=${HOME}/snapshots-${H5VERSION} CURRENT=${BASEDIR}/current PREVIOUS=${BASEDIR}/previous diff --git a/bin/snapshot_version b/bin/snapshot_version new file mode 100644 index 0000000..4ff14f1 --- /dev/null +++ b/bin/snapshot_version @@ -0,0 +1,6 @@ +# default version for snapshot test +# H5VERSION matches with a cvs version symbolic name. Will test use the +# latest revision of that branch. If set to "hdf5", it uses the main +# version. +# H5VER tells runtest which version to run +H5VERSION=hdf5 -- cgit v0.12