summaryrefslogtreecommitdiffstats
path: root/tools/h5jam
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/h5jam
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/h5jam')
-rw-r--r--tools/h5jam/h5jam.c2
-rw-r--r--tools/h5jam/testh5jam.sh.in12
2 files changed, 10 insertions, 4 deletions
diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c
index c6fdb5c..cceed75 100644
--- a/tools/h5jam/h5jam.c
+++ b/tools/h5jam/h5jam.c
@@ -454,7 +454,7 @@ copy_some_to_file (int infid, int outfid, hsize_t startin, hsize_t startout,
if (nchars <= 0)
{
printf ("huh? \n");
- exit (1);
+ exit (EXIT_FAILURE);
}
/*ncw = */ HDwrite (outfid, buf, (unsigned) nchars);
diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in
index e17c860..cfefcdc 100644
--- a/tools/h5jam/testh5jam.sh.in
+++ b/tools/h5jam/testh5jam.sh.in
@@ -21,6 +21,10 @@ USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
+TESTNAME=h5jam/h5unjam
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
DUMPER=h5dump # The dumper to use
DUMPER_BIN=`pwd`/../$DUMPER # The path of the dumper binary
JAM=h5jam # Tool to test
@@ -526,7 +530,9 @@ CLEANUP tac3.h5 taj3.h5
if test $nerrors -eq 0 ; then
- echo "All $JAM tests passed."
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-
-exit $nerrors