diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2009-12-26 07:43:50 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2009-12-26 07:43:50 (GMT) |
commit | 8de1f3aab3c40a81402759d8416d5e71b66b4919 (patch) | |
tree | 0e222109f002762b653900ba9239872e74aea0cf /tools/h5dump | |
parent | b6a36494bc0593e25ce78a807c1ad2121a139a7f (diff) | |
download | hdf5-8de1f3aab3c40a81402759d8416d5e71b66b4919.zip hdf5-8de1f3aab3c40a81402759d8416d5e71b66b4919.tar.gz hdf5-8de1f3aab3c40a81402759d8416d5e71b66b4919.tar.bz2 |
[svn-r18053] 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/h5dump')
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 15 | ||||
-rwxr-xr-x | tools/h5dump/testh5dumpxml.sh.in | 14 |
2 files changed, 18 insertions, 11 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 2c2f69f..a147b45 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -23,6 +23,10 @@ USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" USE_FILTER_NBIT="@USE_FILTER_NBIT@" USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" +TESTNAME=h5dump +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + DUMPER=h5dump # The tool name DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary TESTDIR=`pwd`/../testfiles @@ -508,11 +512,10 @@ TOOLTEST textlinksrc.ddl textlinksrc.h5 TOOLTEST textlinkfar.ddl textlinkfar.h5 - - if test $nerrors -eq 0 ; then - echo "All $DUMPER 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/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in index 3e81a05..c4c8657 100755 --- a/tools/h5dump/testh5dumpxml.sh.in +++ b/tools/h5dump/testh5dumpxml.sh.in @@ -15,6 +15,10 @@ # # Tests for the h5dump tool +TESTNAME=h5dumpxml +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + H5_LONE_COLON="@H5_LONE_COLON@" DUMPER=h5dump # The tool name @@ -185,10 +189,10 @@ TOOLTEST torderattr3.h5.xml --xml -H --sort_by=creation_order --sort_order=ascen TOOLTEST torderattr4.h5.xml --xml -H --sort_by=creation_order --sort_order=descending torderattr.h5 - - if test $nerrors -eq 0 ; then - echo "All $DUMPER tests passed." + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE fi - -exit $nerrors |