summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rwxr-xr-xfortran/examples/testh5fc.sh.in14
-rwxr-xr-xfortran/src/h5fc.in8
2 files changed, 16 insertions, 6 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
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index df52971..db44600 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -36,6 +36,10 @@ HL="@HL@"
## ##
############################################################################
+# Constants definitions
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
host_os="@host_os@"
prog_name="`basename $0`"
@@ -89,7 +93,7 @@ usage() {
echo " HDF5_FC - use a different Fortran 90 or 95 compiler"
echo " HDF5_FLINKER - use a different linker"
echo " "
- exit 1
+ exit $EXIT_FAILURE
}
# Show the configuration summary of the library recorded in the
@@ -101,7 +105,7 @@ showconfigure()
}
# Main
-status=0
+status=$EXIT_SUCCESS
if test "$#" = "0"; then
# No parameters specified, issue usage statement and exit.