summaryrefslogtreecommitdiffstats
path: root/tools/h5import/h5importtestutil.sh
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/h5import/h5importtestutil.sh
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/h5import/h5importtestutil.sh')
-rwxr-xr-xtools/h5import/h5importtestutil.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh
index ca445ed..d8b54a7 100755
--- a/tools/h5import/h5importtestutil.sh
+++ b/tools/h5import/h5importtestutil.sh
@@ -16,8 +16,12 @@
# HDF Utilities Test script
# Usage: h5importtestutil.sh [machine-type]
+TESTNAME=h5import
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# initialize errors variable
-errors=0
+nerrors=0
TESTING() {
SPACES=" "
@@ -37,7 +41,7 @@ cd ..
cmp -s tmp_testfiles/log1 log2 || err=1
rm -f log2 tmp_testfiles/log1
if [ $err -eq 1 ]; then
-errors="` expr $errors + 1 `";
+nerrors="` expr $nerrors + 1 `";
echo "*FAILED*"
else
echo " PASSED"
@@ -120,18 +124,15 @@ rm -f *.txt *.bin *.h5
rm -rf tmp_testfiles
else
echo "** h5import or h5importtest not available ***"
- errors="` expr $errors + 1 `";
+ nerrors="` expr $nerrors + 1 `";
fi
#
# Check errors result
-if [ $errors -eq 0 ]; then
- echo "======================================"
- echo " H5IMPORT Utilities tests have passed."
- echo "======================================"
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
else
- echo "*********************************************"
- echo " H5IMPORT Utilities tests encountered errors"
- echo "*********************************************"
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-exit $errors