summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHDF Admin <hdfadmin@ncsa.uiuc.edu>2003-07-07 16:56:39 (GMT)
committerHDF Admin <hdfadmin@ncsa.uiuc.edu>2003-07-07 16:56:39 (GMT)
commitcdee39002db5fec2931d95ce6fbb98cb8d72408c (patch)
tree938fdbf196bee144c7bc4ba716dea1609c613730 /bin
parent58e0f63a3c29a36cec5b0df3fe526c0303572444 (diff)
downloadhdf5-cdee39002db5fec2931d95ce6fbb98cb8d72408c.zip
hdf5-cdee39002db5fec2931d95ce6fbb98cb8d72408c.tar.gz
hdf5-cdee39002db5fec2931d95ce6fbb98cb8d72408c.tar.bz2
[svn-r7178] Purpose:
Bug fix Description: If the base directory (.../snapshot-...) does not exist yet, the runtest and snapshot will continue on till it bumped into a "wall". Solution: Added verification that the BASEDIR does exist. Misc. update:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/runtest7
-rwxr-xr-xbin/snapshot10
2 files changed, 11 insertions, 6 deletions
diff --git a/bin/runtest b/bin/runtest
index 39b89c2..330eb7d 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -553,8 +553,13 @@ fi
#################################
# Setup snapshot test directories
#################################
+BASEDIR=${HOME}/snapshots-${H5VERSION}
+if [ ! -d ${BASEDIR} ]; then
+ echo "BASEDIR ($BASEDIR) does not exist"
+ exit 1
+fi
# Show the real physical path rather than the symbolic path
-SNAPYARD=`cd $HOME/snapshots-${H5VERSION} && /bin/pwd`
+SNAPYARD=`cd $BASEDIR && /bin/pwd`
# Log file basename
LOGBASENAME=${SNAPYARD}/log/${HOSTNAME}
PASSEDLOG=${SNAPYARD}/log/PASSED_LOG_${TODAY}
diff --git a/bin/snapshot b/bin/snapshot
index c8f4f1a..b9ee743 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -217,6 +217,11 @@ else
fi
BASEDIR=${HOME}/snapshots-${H5VERSION}
+if [ ! -d ${BASEDIR} ]; then
+ echo "BASEDIR ($BASEDIR) does not exist"
+ exit 1
+fi
+
CURRENT=${BASEDIR}/current
PREVIOUS=${BASEDIR}/previous
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
@@ -238,11 +243,6 @@ done
#=============================
if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
TIMESTAMP "checkout"
- # Create a working directory. Hopefully one is left over from last
- # time that still has the contents of the previous release. But if
- # not, just create one and assume that a snapshot is necessary.
- test -d ${BASEDIR} || mkdir -p ${BASEDIR} || exit 1
-
# If there is a Makefile in ${CURRENT}, the last test done in it
# has not been distclean'ed. They would interfere with other
# --srcdir build since make considers the files in ${CURRENT}