summaryrefslogtreecommitdiffstats
path: root/examples/testh5cc.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'examples/testh5cc.sh.in')
-rwxr-xr-xexamples/testh5cc.sh.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in
index 818375b..0e2b851 100755
--- a/examples/testh5cc.sh.in
+++ b/examples/testh5cc.sh.in
@@ -24,6 +24,10 @@
#
# Initializations
+TESTNAME=h5cc
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# Where the tool is installed.
prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
@@ -39,7 +43,7 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
-nerrors=0
+nerrors=$EXIT_SUCCESS
verbose=${HDF5_VERBOSE:-1} # 0: none; 1: default; 2: chatty; 3: everything
test $verbose -gt 2 && set -x
H5_NO_DEPRECATED_SYMBOLS=`grep '#define H5_NO_DEPRECATED_SYMBOLS ' ../src/H5pubconf.h`
@@ -343,7 +347,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