summaryrefslogtreecommitdiffstats
path: root/c++/examples
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-12-26 10:12:28 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-12-26 10:12:28 (GMT)
commitaea22826003bbcc0ce2c20692d47b7f8961e0465 (patch)
treee38c68e28fa11202e837d0514a41625d542bdef8 /c++/examples
parent51e9b5952757a7cf68411b4a85e2914f19879749 (diff)
downloadhdf5-aea22826003bbcc0ce2c20692d47b7f8961e0465.zip
hdf5-aea22826003bbcc0ce2c20692d47b7f8961e0465.tar.gz
hdf5-aea22826003bbcc0ce2c20692d47b7f8961e0465.tar.bz2
[svn-r18056] Bug fix: 1192
Description: Fixed exit code (sometimes return code in Main) to follow the HDF5 standards. Tested: Jam, both serial and parallel.
Diffstat (limited to 'c++/examples')
-rwxr-xr-xc++/examples/testh5c++.sh.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in
index 2b7bbfe..4281e3c 100755
--- a/c++/examples/testh5c++.sh.in
+++ b/c++/examples/testh5c++.sh.in
@@ -20,6 +20,10 @@
#
# Initializations
+TESTNAME=h5c++
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# Where the tool is installed.
prefix="${prefix:-@prefix@}"
AR="@AR@"
@@ -30,7 +34,7 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
-nerrors=0
+nerrors=$EXIT_SUCCESS
verbose=yes
# setup my machine information.
@@ -271,7 +275,9 @@ if test -z "$HDF5_NOCLEANUP"; then
fi
if test $nerrors -eq 0 ; then
- echo "All $H5TOOL tests passed."
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-
-exit $nerrors