summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-06-30 23:35:32 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-06-30 23:35:32 (GMT)
commit43f091f462202a84a863f000582e75fd6c04e6f4 (patch)
tree00bd95eeb9f866516324e4481a78174e6628d651 /tools
parentafcd1ddb398e04006da8b11a95a60cec61da7349 (diff)
downloadhdf5-43f091f462202a84a863f000582e75fd6c04e6f4.zip
hdf5-43f091f462202a84a863f000582e75fd6c04e6f4.tar.gz
hdf5-43f091f462202a84a863f000582e75fd6c04e6f4.tar.bz2
[svn-r11008] Purpose:
Feature: tests now use parallel make and only run once Description: When make is invoked in parallel (using the -j option), several tests will now be run simultaneously. This should speed up testing on a number of systems. When a test passes, it creates a foo.chkexe or foo.chksh file, which prevents the test from running again unless the test or library changes. Solution: Most of the changes live in config/conclude.am. Added *.chkexe and *.chksh files to the list of files to be cleaned at "make mostlyclean" time. Parallel tests still run one at a time, but use the same make instructions as serial tests. Platforms tested: mir, eirene, sleipnir, pommier, copper, modi4 (some errors occurred, probably due to the test being run before updating hdf5. Will re-run tests after checkin.)
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in168
-rw-r--r--tools/gifconv/Makefile.in168
-rw-r--r--tools/h5diff/Makefile.am2
-rw-r--r--tools/h5diff/Makefile.in174
-rw-r--r--tools/h5dump/Makefile.am2
-rw-r--r--tools/h5dump/Makefile.in174
-rwxr-xr-xtools/h5import/Makefile.in168
-rw-r--r--tools/h5jam/Makefile.am2
-rw-r--r--tools/h5jam/Makefile.in168
-rw-r--r--tools/h5ls/Makefile.in168
-rw-r--r--tools/h5repack/Makefile.am2
-rw-r--r--tools/h5repack/Makefile.in174
-rw-r--r--tools/lib/Makefile.in168
-rw-r--r--tools/misc/Makefile.am2
-rw-r--r--tools/misc/Makefile.in177
15 files changed, 824 insertions, 893 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 8a9008b..69fdb92 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -281,6 +281,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh
+
# All subdirectories
SUBDIRS = lib h5dump h5diff h5ls misc gifconv h5import h5repack h5jam
@@ -296,6 +299,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-recursive
.SUFFIXES:
@@ -535,6 +542,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -613,9 +621,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -642,71 +650,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -719,40 +739,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/gifconv/Makefile.in b/tools/gifconv/Makefile.in
index 9574696..6cdaaac 100644
--- a/tools/gifconv/Makefile.in
+++ b/tools/gifconv/Makefile.in
@@ -304,6 +304,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh
+
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
gif2h5_SOURCES = gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
@@ -324,6 +327,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -537,6 +544,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -616,9 +624,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -645,71 +653,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -722,40 +742,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am
index 9dbe53a..811297c 100644
--- a/tools/h5diff/Makefile.am
+++ b/tools/h5diff/Makefile.am
@@ -50,7 +50,7 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
# Temporary files. *.h5 are generated by h5diff. They should
# be copied to the testfiles/ directory if update is required
-MOSTLYCLEANFILES=*.h5 expect_sorted actual_sorted
+MOSTLYCLEANFILES+=*.h5 expect_sorted actual_sorted
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index a5bf0b5..27606ff 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -312,6 +312,12 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+
+# Temporary files. *.h5 are generated by h5diff. They should
+# be copied to the testfiles/ directory if update is required
+MOSTLYCLEANFILES = *.chkexe *.chksh *.h5 expect_sorted actual_sorted
+
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
@@ -335,10 +341,6 @@ h5difftst_SOURCES = testh5diff_main.c testh5diff_attr.c \
# Programs depend on the main HDF5 library and tools library
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
-# Temporary files. *.h5 are generated by h5diff. They should
-# be copied to the testfiles/ directory if update is required
-MOSTLYCLEANFILES = *.h5 expect_sorted actual_sorted
-
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
@@ -351,6 +353,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -656,9 +662,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -685,71 +691,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -762,40 +780,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am
index 5c74d13..42b067c 100644
--- a/tools/h5dump/Makefile.am
+++ b/tools/h5dump/Makefile.am
@@ -37,7 +37,7 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
# Temporary files. *.h5 are generated by h5dumpgentest. They should
# copied to the testfiles/ directory if update is required.
-MOSTLYCLEANFILES=*.h5
+MOSTLYCLEANFILES+=*.h5
DISTCLEANFILES=testh5dump.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 724a418..50d6ece 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -305,6 +305,12 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+
+# Temporary files. *.h5 are generated by h5dumpgentest. They should
+# copied to the testfiles/ directory if update is required.
+MOSTLYCLEANFILES = *.chkexe *.chksh *.h5
+
# Include files in /src directory and /tools/lib directory
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
@@ -315,10 +321,6 @@ check_SCRIPTS = $(TEST_SCRIPT)
# All the programs depend on the hdf5 and h5tools libraries
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
-
-# Temporary files. *.h5 are generated by h5dumpgentest. They should
-# copied to the testfiles/ directory if update is required.
-MOSTLYCLEANFILES = *.h5
DISTCLEANFILES = testh5dump.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
@@ -333,6 +335,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -632,9 +638,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -661,71 +667,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -738,40 +756,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index d7a2329..b9333e6 100755
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -305,6 +305,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh
+
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
@@ -328,6 +331,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -543,6 +550,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -623,9 +631,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -652,71 +660,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -729,40 +749,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5jam/Makefile.am b/tools/h5jam/Makefile.am
index 6e54756..0bb0ea8 100644
--- a/tools/h5jam/Makefile.am
+++ b/tools/h5jam/Makefile.am
@@ -32,7 +32,7 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
## Temporary files. *.h5 are generated by jamgentest. They should
## copied to the testfiles/ directory if update is required.
-MOSTLYCLEANFILES=*.h5 *.txt
+MOSTLYCLEANFILES+=*.h5 *.txt
DISTCLEANFILES=testh5jam.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 866b3b5..12a6f6e 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -300,6 +300,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh *.h5 *.txt
+
#
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
@@ -323,7 +326,6 @@ check_SCRIPTS = $(TEST_SCRIPT)
# Link against the main HDF5 library and tools library
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
-MOSTLYCLEANFILES = *.h5 *.txt
DISTCLEANFILES = testh5jam.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
@@ -338,6 +340,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -649,9 +655,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -678,71 +684,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -755,40 +773,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 7a4bb64..e3582a0 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -298,6 +298,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh
+
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
@@ -320,6 +323,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -524,6 +531,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -603,9 +611,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -632,71 +640,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -709,40 +729,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am
index 130c4f2..aa4e1c5 100644
--- a/tools/h5repack/Makefile.am
+++ b/tools/h5repack/Makefile.am
@@ -50,7 +50,7 @@ testh5repack_detect_szip_SOURCES=testh5repack_detect_szip.c
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
-MOSTLYCLEANFILES=*.h5
+MOSTLYCLEANFILES+=*.h5
DISTCLEANFILES=h5repack.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 660e253..d067667 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -320,6 +320,12 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+
+# Temporary files. *.h5 are generated by h5repack. They should
+# copied to the testfiles/ directory if update is required.
+MOSTLYCLEANFILES = *.chkexe *.chksh *.h5
+
# Include src, test, and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
@@ -341,10 +347,6 @@ h5repacktst_SOURCES = $(COMMON_SOURCES) testh5repack_attr.c testh5repack_dset.c
testh5repack_main.c testh5repack_make.c testh5repack_util.c
testh5repack_detect_szip_SOURCES = testh5repack_detect_szip.c
-
-# Temporary files. *.h5 are generated by h5repack. They should
-# copied to the testfiles/ directory if update is required.
-MOSTLYCLEANFILES = *.h5
DISTCLEANFILES = h5repack.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
@@ -359,6 +361,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -682,9 +688,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -711,71 +717,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -788,40 +806,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 1a7369e..bced05d 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -302,6 +302,9 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+MOSTLYCLEANFILES = *.chkexe *.chksh
+
# Include files in /src directory
INCLUDES = -I$(top_srcdir)/src
@@ -337,6 +340,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -541,6 +548,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -620,9 +628,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -649,71 +657,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -726,40 +746,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false
diff --git a/tools/misc/Makefile.am b/tools/misc/Makefile.am
index fd1a866..3e2e173 100644
--- a/tools/misc/Makefile.am
+++ b/tools/misc/Makefile.am
@@ -44,7 +44,7 @@ CLEANFILES=h5redeploy
# Temporary files. *.h5 are generated by h5repart_gentest. They should
# copied to the testfiles/ directory if update is required. fst_family*.h5
# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
-MOSTLYCLEANFILES=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5
+MOSTLYCLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5
# These were generated by configure. Remove them only when distclean.
DISTCLEANFILES=h5cc testh5repart.sh
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 60c4454..21806d2 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -325,6 +325,14 @@ H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+# .chkexe and .chksh files are used to mark tests that have run successfully.
+
+# Temporary files. *.h5 are generated by h5repart_gentest. They should
+# copied to the testfiles/ directory if update is required. fst_family*.h5
+# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
+MOSTLYCLEANFILES = *.chkexe *.chksh *.h5 ../testfiles/fst_family*.h5 \
+ ../testfiles/scd_family*.h5
+
# Include src directory
INCLUDES = -I$(top_srcdir)/src
@@ -340,11 +348,6 @@ bin_SCRIPTS = h5redeploy
# Tell automake to clean h5redeploy script
CLEANFILES = h5redeploy
-# Temporary files. *.h5 are generated by h5repart_gentest. They should
-# copied to the testfiles/ directory if update is required. fst_family*.h5
-# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
-MOSTLYCLEANFILES = *.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5
-
# These were generated by configure. Remove them only when distclean.
DISTCLEANFILES = h5cc testh5repart.sh
@@ -368,6 +371,10 @@ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chksh_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chksh_)
all: all-am
.SUFFIXES:
@@ -714,9 +721,9 @@ build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests ::
- @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; \
- for d in X $(SUBDIRS); do \
+lib progs tests check-s check-p ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
if test $$d != X -a $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -743,71 +750,83 @@ install-doc uninstall-doc:
check-TESTS: test
test _test:
- $(MAKE) _check-s
- $(MAKE) _check-p
-
-# Run check-s/check-p recursively down SUBDIRS
-check-s check-p:
- @$(MAKE) $(AM_MAKEFLAGS) _$@ || exit 1; \
- for d in X $(SUBDIRS); do \
- if test $$d != X -a $$d != .; then \
- (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
- fi; \
- done
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
# Actual execution of check-s.
-_check-s: $(LIB) $(PROGS) $(TESTS)
+build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
- @for test in $(TEST_PROG) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNTESTS) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
- @for test in $(TEST_SCRIPT) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
- fi; \
- done; \
- test $$test = dummy || false
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The .chkexe_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) .chkexe_:
+ @if test "X$@" != "X.chkexe_"; then \
+ echo "============================"; \
+ if test -e $(@:.chkexe_=.chkexe) && \
+ test $(@:.chkexe_=.chkexe) -nt $(@:.chkexe_=)$(EXEEXT); then \
+ echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ srcdir="$(srcdir)" \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# The .chksh_ here is the "dummy" that prevents the target from being
+# empty if there are no tests in the current directory.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) .chksh_:
+ @if test "X$@" != "X.chksh_"; then \
+ echo "============================"; \
+ if test -e $(@:.chksh_=.chksh) && \
+ test $(@:.chksh_=.chksh) -nt $(@:.chksh_=); then \
+ echo "No need to test $(@:.chksh_=) again."; \
+ else \
+ if test "X$(HDF_FORTRAN)" = "Xyes"; then \
+ echo "Fortran API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ elif test "X$(HDF_CXX)" = "Xyes"; then \
+ echo "C++ API: Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ else \
+ echo "Testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(SHELL) ./$(@:.chksh_=) $(TEST_FLAGS) \
+ && touch $(@:.chksh_=.chksh) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ exit 1; \
+ echo ""; \
+ echo "Finished testing $(@:.chksh_=) $(TEST_FLAGS)"; \
+ fi; \
+ echo "============================"; \
+ fi
+
# Actual execution of check-p.
-_check-p: $(LIB) $(PROGS) $(TESTS)
+build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
- fi
+ fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
@@ -820,40 +839,14 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- srcdir="$(srcdir)" \
- $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNTESTS="$(RUNPARALLEL)"; \
fi; \
done; \
test $$test = dummy || false
@for test in $(TEST_SCRIPT_PARA) dummy; do \
- if test $$test != dummy; then \
- echo "============================"; \
- if test "X$(HDF_FORTRAN)" = "Xyes"; then \
- echo "Fortran API: Testing $$test $(TEST_FLAGS)"; \
- elif test "X$(HDF_CXX)" = "Xyes"; then \
- echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
- else \
- echo "Testing $$test $(TEST_FLAGS)"; \
- fi; \
- echo "============================"; \
- RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
- srcdir="$(srcdir)" \
- /bin/sh $$test $(TEST_FLAGS) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- break; \
- echo ""; \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chksh_; \
fi; \
done; \
test $$test = dummy || false