summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/Makefile.in8
-rw-r--r--tools/h5copy/h5copy.c4
-rw-r--r--tools/h5copy/testh5copy.sh13
3 files changed, 15 insertions, 10 deletions
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index d2a8e0d..113abba 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -322,12 +322,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -839,7 +839,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -910,7 +910,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
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 b513938..c330602 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
@@ -304,8 +308,9 @@ echo " "
COPYOBJECTS h5copytst_new.h5
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
-