diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2002-03-09 22:34:23 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2002-03-09 22:34:23 (GMT) |
commit | 537abb72e5f1bf7f171bad699798775100925840 (patch) | |
tree | 4eb04dfc661b0275efbe6dfbfd68a352fb82a57d /bin/snapshot | |
parent | 030fce8c3d1bde2ad36ab535abfa6efc601b0ff0 (diff) | |
download | hdf5-537abb72e5f1bf7f171bad699798775100925840.zip hdf5-537abb72e5f1bf7f171bad699798775100925840.tar.gz hdf5-537abb72e5f1bf7f171bad699798775100925840.tar.bz2 |
[svn-r5056] 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-x | bin/snapshot | 19 |
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} && \ |