summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-12-26 10:12:49 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-12-26 10:12:49 (GMT)
commitac5945b412d3f7d8453f46cdd3da6ec45f18c3df (patch)
tree73fdc388b42ddaf4a29dd26b5587228fd894aaf0 /fortran/examples
parentf40a245ce239b9597efa815d70d1d9f005fbafdc (diff)
downloadhdf5-ac5945b412d3f7d8453f46cdd3da6ec45f18c3df.zip
hdf5-ac5945b412d3f7d8453f46cdd3da6ec45f18c3df.tar.gz
hdf5-ac5945b412d3f7d8453f46cdd3da6ec45f18c3df.tar.bz2
[svn-r18057] 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 'fortran/examples')
-rwxr-xr-xfortran/examples/testh5fc.sh.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in
index a25abbe..234d4e2 100755
--- a/fortran/examples/testh5fc.sh.in
+++ b/fortran/examples/testh5fc.sh.in
@@ -20,6 +20,10 @@
#
# Initializations
+TESTNAME=h5fc
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# Where the tool is installed.
prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
@@ -35,7 +39,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.
@@ -217,7 +221,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