mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[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.
This commit is contained in:
parent
ce99ea075c
commit
e72f4e6cdb
35
bin/snapshot
35
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
|
||||
|
Loading…
Reference in New Issue
Block a user