summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-12-26 07:43:50 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-12-26 07:43:50 (GMT)
commit8de1f3aab3c40a81402759d8416d5e71b66b4919 (patch)
tree0e222109f002762b653900ba9239872e74aea0cf /tools/h5copy
parentb6a36494bc0593e25ce78a807c1ad2121a139a7f (diff)
downloadhdf5-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/h5copy')
-rw-r--r--tools/h5copy/h5copy.c4
-rw-r--r--tools/h5copy/testh5copy.sh13
2 files changed, 11 insertions, 6 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index f2a41ae..2d5b95d 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -428,7 +428,7 @@ main (int argc, const char *argv[])
h5tools_close();
- return 0;
+ return EXIT_SUCCESS;
error:
printf("Error in copy...Exiting\n");
@@ -449,6 +449,6 @@ error:
h5tools_close();
- return 1;
+ return EXIT_FAILURE;
}
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index c374e08..4f1d8cc 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -19,6 +19,10 @@
# Thursday, July 20, 2006
#
+TESTNAME=h5copy
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
H5COPY=h5copy # The tool name
H5COPY_BIN=`pwd`/$H5COPY # The path of the tool binary
H5DIFF=h5diff # The h5diff tool name
@@ -300,8 +304,9 @@ COPYOBJECTS
if test $nerrors -eq 0 ; then
- echo "All h5copy tests passed."
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-
-exit $nerrors
-