summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-03-23 05:45:04 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-03-23 05:45:04 (GMT)
commite72f4e6cdb7026eda2a0cb1cde57f84f8357838f (patch)
tree230c6cecf2286ee6676acde63c2faf9cc9cb267a
parentce99ea075cdd707ecacfd32513cb330a3b88bc65 (diff)
downloadhdf5-e72f4e6cdb7026eda2a0cb1cde57f84f8357838f.zip
hdf5-e72f4e6cdb7026eda2a0cb1cde57f84f8357838f.tar.gz
hdf5-e72f4e6cdb7026eda2a0cb1cde57f84f8357838f.tar.bz2
[svn-r2049] Added the "clean" and "distclean" option for cleaning the test directory.
This would help clean disk usage after the daily test is done.
-rwxr-xr-xbin/snapshot35
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/snapshot b/bin/snapshot
index 3b29e2b..f1cf331 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -72,6 +72,10 @@ while [ $# -gt 0 ] ; do
cmdrel="release"
cmd=""
;;
+ clean | distclean)
+ cmdclean="$1"
+ cmd=""
+ ;;
help)
cmd="help"
break
@@ -127,6 +131,8 @@ Usage: $0 [all] [checkout] [test] [srcdir] [release] [help]
checkout: Run cvs checkout
test: Run test
release: Run release
+ clean: Run make clean
+ distclean:Run make distclean
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"
@@ -262,4 +268,33 @@ if [ "$cmd" = "all" -o -n "$cmdrel" ]; then
mv ${CURRENT} ${PREVIOUS}
fi #Release snapshot
+
+#=============================
+# Clean the test area. Default is no clean.
+#=============================
+if [ -n "$cmdclean" ]; then
+ # setup if srcdir is used.
+ if [ -z "$srcdir" ]; then
+ TESTDIR=${CURRENT}
+ else
+ case "$SRCDIRNAME" in
+ "")
+ SRCDIRNAME=`hostname`
+ ;;
+ -*)
+ SRCDIRNAME="`hostname`$SRCDIRNAME"
+ ;;
+ esac
+ TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
+ fi
+ # Make sure current version exists and is clean
+ if [ -d ${TESTDIR} ]; then
+ (cd ${TESTDIR} && ${MAKE} $cmdclean )
+ else
+ errcode=$?
+ snapshot=no
+ exit $errcode
+ fi
+fi # Clean the Test directory
+
exit $errcode