summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-11-26 18:25:08 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-11-26 18:25:08 (GMT)
commitf2eecee94c4c093c1ff08fb0da05b341ff53835e (patch)
tree2a3b9d89de9f0ff9e5030a1de32ed36b705f692f
parent4a77040deb408bda10ce7a000a4f27cbc84e2283 (diff)
downloadhdf5-f2eecee94c4c093c1ff08fb0da05b341ff53835e.zip
hdf5-f2eecee94c4c093c1ff08fb0da05b341ff53835e.tar.gz
hdf5-f2eecee94c4c093c1ff08fb0da05b341ff53835e.tar.bz2
[svn-r7893] Purpose:
new feature Description: Folded the new feature of -setup option into this branch too. Platforms tested: Tested in LANL Theta. Misc. update:
-rwxr-xr-xbin/runtest63
-rwxr-xr-xbin/snapshot2
2 files changed, 54 insertions, 11 deletions
diff --git a/bin/runtest b/bin/runtest
index e938680..129c3da 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -33,6 +33,7 @@
DEBUGMODE=""
test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
WHEREAMI='pwd'
+CMD=
# the name of this program
PROGNAME="bin/runtest $DEBUGMODE"
@@ -489,6 +490,8 @@ Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...
do not do cvs commands
-nodiff
do not do diff commands
+ -setup
+ setup the directory structure for snapshot test
-configname <name>
use <name> as hostname in the parsing of the snaptest configure file
<host>
@@ -501,6 +504,21 @@ EOF
}
+# Verify if directory ($1) exists. If not, create it.
+CHECK_DIR()
+{
+ dir=$1
+ if test ! -e $1; then
+ echo mkdir $1
+ mkdir $1
+ errcode=$?
+ elif test ! -d $1; then
+ echo $1 is not a directory
+ errcode=1
+ fi
+}
+
+
#################################
# Main
#################################
@@ -551,6 +569,10 @@ while [ $# -gt 0 ]; do
shift
CONFIGNAME=$1
;;
+ -setup)
+ # setup the directory structure for snapshot test
+ CMD=setup
+ ;;
-*) # Unknow option
PRINT "Unknown option ($1)"
USAGE
@@ -582,28 +604,49 @@ fi
# Setup snapshot test directories
#################################
BASEDIR=${HOME}/snapshots-${H5VERSION}
-if [ ! -d ${BASEDIR} ]; then
+# initial processing of setup option if requested
+if test x-$CMD = x-setup; then
+ CHECK_DIR $BASEDIR
+ test $errcode -ne 0 && exit 1
+elif [ ! -d ${BASEDIR} ]; then
echo "BASEDIR ($BASEDIR) does not exist"
exit 1
fi
# Show the real physical path rather than the symbolic path
SNAPYARD=`cd $BASEDIR && /bin/pwd`
# Log file basename
-LOGBASENAME=${SNAPYARD}/log/${HOSTNAME}
-PASSEDLOG=${SNAPYARD}/log/PASSED_LOG_${TODAY}
-FAILEDLOG=${SNAPYARD}/log/FAILED_LOG_${TODAY}
-TIMELOG=${SNAPYARD}/log/TIME_LOG_${TODAY}
-CVSLOG=${SNAPYARD}/log/CVS_LOG_${TODAY}
-CVSLOG_LOCK=${SNAPYARD}/log/CVS_LOG_LOCK_${TODAY}
-DIFFLOG=${SNAPYARD}/log/DIFF_LOG_${TODAY}
-# Snap Test Configuration file
+LOGDIR=${SNAPYARD}/log
+LOGBASENAME=${LOGDIR}/${HOSTNAME}
+PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
+FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
+TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
+CVSLOG=${LOGDIR}/CVS_LOG_${TODAY}
+CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY}
+DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY}
+# Snap Test hosts and Configuration files
+ALLHOSTSFILE=${SNAPYARD}/allhostfile
SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
+# more processing of setup option if requested
+if test x-$CMD = x-setup; then
+ CHECK_DIR $LOGDIR
+ test $errcode -ne 0 && exit 1
+ CHECK_DIR $LOGDIR/OLD
+ test $errcode -ne 0 && exit 1
+ CHECK_DIR $SNAPYARD/TestDir
+ test $errcode -ne 0 && exit 1
+ # create empty test hosts or configure files if non-existing
+ for f in $ALLHOSTSFILE $SNAPTESTCFG; do
+ echo Creating $f
+ touch $f
+ done
+ # setup completed. Exit.
+ exit 0
+fi
#################################
# Setup test host(s)
#################################
-ALLHOSTSFILE=${SNAPYARD}/allhostfile
if [ "$TESTHOST" = -all ]; then
if [ -f $ALLHOSTSFILE ]; then
TESTHOST=`sed -e s/#.*// $ALLHOSTSFILE`
diff --git a/bin/snapshot b/bin/snapshot
index b9ee743..897ccc9 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -259,7 +259,7 @@ if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
exit 1
fi
# Check out the current version from CVS
- cvs -Q co -d ${CURRENT} ${CVSVERSION} hdf5 || exit 1
+ (cd $BASEDIR; cvs -Q co -d current ${CVSVERSION} hdf5 ) || exit 1
fi # Do CVS checkout