summaryrefslogtreecommitdiffstats
path: root/tools/h5import/h5importtestutil.sh
diff options
context:
space:
mode:
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