summaryrefslogtreecommitdiffstats
path: root/bin/snapshot
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-03-08 23:36:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-03-08 23:36:59 (GMT)
commit6531ce3b5249be34c30cdf6b6ee7dec49aa20d9c (patch)
tree9f7aa8a6819f06301a69de2454cc3d493e824678 /bin/snapshot
parent918cc351d225376e3925e484a31513103b99ea0a (diff)
downloadhdf5-6531ce3b5249be34c30cdf6b6ee7dec49aa20d9c.zip
hdf5-6531ce3b5249be34c30cdf6b6ee7dec49aa20d9c.tar.gz
hdf5-6531ce3b5249be34c30cdf6b6ee7dec49aa20d9c.tar.bz2
[svn-r5055] Purpose:
New feature Description: "snapshot diff" will just run the diff and exit 0 is no significant differences found between current and previous versions. Runtest will try a "snapshot diff" and will skip test if no significant differences are found. Platforms tested: eirene
Diffstat (limited to 'bin/snapshot')
-rwxr-xr-xbin/snapshot19
1 files changed, 17 insertions, 2 deletions
diff --git a/bin/snapshot b/bin/snapshot
index a0b5fff..91a863f 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -52,6 +52,10 @@ while [ $# -gt 0 ] ; do
cmdcheckout="checkout"
cmd=""
;;
+ diff)
+ cmddiff="diff"
+ cmd=""
+ ;;
test)
cmdtest="test"
cmd=""
@@ -134,6 +138,8 @@ Usage: $0 [all] [checkout] [test] [srcdir] [release] [help]
all: Run all commands (checkout, test & release)
[Default is all]
checkout: Run cvs checkout
+ diff: Run diff on current and previous versions. Exit 0 if
+ no significant differences are found. Otherwise, non-zero.
test: Run test
release: Run release
clean: Run make clean
@@ -223,7 +229,7 @@ fi # Do CVS checkout
#=============================
# Run Test the HDF5 library
#=============================
-if [ "$cmd" = "all" -o -n "$cmdtest" ]; then
+if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
# setup if srcdir is used.
if [ -z "$srcdir" ]; then
TESTDIR=${CURRENT}
@@ -264,13 +270,22 @@ if [ "$cmd" = "all" -o -n "$cmdtest" ]; then
: #continue
else
snapshot=yes
- # Don't break because we want to see all the diffs.
break
fi
done
fi
fi
+ # if diff is choosen, exit 0 if no significant differences are found.
+ # otherwise, exit 1. This includes cases of other failures.
+ if [ -n "$cmddiff" ]; then
+ if [ $snapshot = no ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ fi
+
# Build, run tests and install procedures
if [ "$snapshot" = "yes" ]; then
if (cd ${TESTDIR} && \