summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-12-26 08:36:37 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-12-26 08:36:37 (GMT)
commitf40a245ce239b9597efa815d70d1d9f005fbafdc (patch)
treed80f84b7a067f8ef634f0839d2d135d487d3e5eb /tools/h5diff
parent840e04ab5f5ce7fa5d07a3c9187944c27f9534e9 (diff)
downloadhdf5-f40a245ce239b9597efa815d70d1d9f005fbafdc.zip
hdf5-f40a245ce239b9597efa815d70d1d9f005fbafdc.tar.gz
hdf5-f40a245ce239b9597efa815d70d1d9f005fbafdc.tar.bz2
[svn-r18055] Bug fix: 1192
Description: Fixed exit code (sometimes return code in Main) to follow the HDF5 standards. Tested: H5committested plus serial test in Jam.
Diffstat (limited to 'tools/h5diff')
-rwxr-xr-xtools/h5diff/testh5diff.sh13
-rwxr-xr-xtools/h5diff/testph5diff.sh14
2 files changed, 18 insertions, 9 deletions
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index d6550fd..f95e260 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -56,6 +56,10 @@ FILE10="$INDIR/$SRCFILE10"
FILE11="$INDIR/$SRCFILE11"
+TESTNAME=h5diff
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
H5DIFF=h5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
@@ -80,6 +84,7 @@ test -d ./testfiles || mkdir ./testfiles
while [ $# -gt 0 ]; do
case "$1" in
-p) # reset the tool name and bin to run ph5diff tests
+ TESTNAME=ph5diff
H5DIFF=ph5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF
pmode=yes
@@ -616,7 +621,9 @@ TOOLTEST h5diff_207.txt -c $FILE2 $FILE2 g2/dset8 g2/dset9
# ##############################################################################
if test $nerrors -eq 0 ; then
- echo "All $H5DIFF tests passed."
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-
-exit $nerrors
diff --git a/tools/h5diff/testph5diff.sh b/tools/h5diff/testph5diff.sh
index 1375756..0734d21 100755
--- a/tools/h5diff/testph5diff.sh
+++ b/tools/h5diff/testph5diff.sh
@@ -19,6 +19,10 @@ if test -z "$srcdir"; then
srcdir=.
fi
+TESTNAME=ph5diff
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
TOOL=${srcdir}/testh5diff.sh
nerrors=0
@@ -53,12 +57,10 @@ TOOLTEST() {
# testphdf5 test using the MPI-POSIX VFL driver
TOOLTEST -p
-# Emit message about testing status
+# no need to print any message since this is just a shell to invoke
+# testh5diff.sh which has already printed the result. Just exit.
if test $nerrors -eq 0 ; then
- echo "All $TEST_APP tests passed."
+ exit $EXIT_SUCCESS
else
- echo "ERROR! One or more $TOOL tests failed."
+ exit $EXIT_FAILURE
fi
-
-# Propagate a useful exit code
-exit $nerrors