diff options
Diffstat (limited to 'hl')
-rwxr-xr-x | hl/Makefile.in | 168 | ||||
-rw-r--r-- | hl/c++/Makefile.in | 168 | ||||
-rw-r--r-- | hl/c++/src/Makefile.in | 168 | ||||
-rw-r--r-- | hl/c++/test/Makefile.in | 168 | ||||
-rw-r--r-- | hl/fortran/Makefile.in | 168 | ||||
-rw-r--r-- | hl/fortran/src/Makefile.in | 168 | ||||
-rw-r--r-- | hl/fortran/test/Makefile.am | 2 | ||||
-rw-r--r-- | hl/fortran/test/Makefile.in | 172 | ||||
-rw-r--r-- | hl/src/Makefile.in | 168 | ||||
-rw-r--r-- | hl/test/Makefile.am | 2 | ||||
-rw-r--r-- | hl/test/Makefile.in | 176 | ||||
-rw-r--r-- | hl/tools/gif2h5/Makefile.in | 168 |
12 files changed, 816 insertions, 880 deletions
diff --git a/hl/Makefile.in b/hl/Makefile.in index d72d912..4d4ff34 100755 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -275,6 +275,9 @@ H5CC = $(bindir)/h5cc 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 @BUILD_FORTRAN_CONDITIONAL_TRUE@FORTRAN_DIR = fortran @BUILD_CXX_CONDITIONAL_TRUE@CXX_DIR = c++ @BUILD_HDF5_HL_CONDITIONAL_TRUE@SUBDIRS = src test $(CXX_DIR) $(FORTRAN_DIR) @@ -291,6 +294,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: @@ -530,6 +537,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -608,9 +616,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; \ @@ -637,71 +645,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" \ @@ -714,40 +734,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/hl/c++/Makefile.in b/hl/c++/Makefile.in index 83e5769..c72b423 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -280,6 +280,9 @@ H5CC = $(bindir)/h5cc 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 SUBDIRS = src test # Automake needs to be taught how to build lib, progs, and tests targets. @@ -294,6 +297,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: @@ -533,6 +540,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -611,9 +619,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; \ @@ -640,71 +648,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" \ @@ -717,40 +737,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/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 2e5ff5e..4a1db55 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -303,6 +303,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 directory INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src @@ -333,6 +336,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: @@ -551,6 +558,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -633,9 +641,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; \ @@ -662,71 +670,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" \ @@ -739,40 +759,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/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 2e53a5d..9cee7ce 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -297,6 +297,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 directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test @@ -323,6 +326,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: @@ -503,6 +510,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -582,9 +590,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; \ @@ -611,71 +619,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" \ @@ -688,40 +708,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/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index d5041b0..a23abca 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -275,6 +275,9 @@ H5CC = $(bindir)/h5cc 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 SUBDIRS = src test # Automake needs to be taught how to build lib, progs, and tests targets. @@ -289,6 +292,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: @@ -528,6 +535,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -606,9 +614,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; \ @@ -635,71 +643,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" \ @@ -712,40 +732,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/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 0fdf5cf..7700a83 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -296,6 +296,9 @@ H5CC = $(bindir)/h5cc 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 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src @@ -327,6 +330,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: @@ -540,6 +547,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -657,9 +665,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; \ @@ -686,71 +694,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" \ @@ -763,40 +783,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/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index 8597e1f..e40155a 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -29,6 +29,6 @@ tstimage_SOURCES=tstimage.f90 tsttable_SOURCES=tsttable.f90 # Temporary files. -MOSTLYCLEANFILES=dsetf[1-4].h5 f1img.h5 f1tab.h5 +MOSTLYCLEANFILES+=dsetf[1-4].h5 f1img.h5 f1tab.h5 include $(top_srcdir)/config/conclude.am diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index bcc5110..979832a 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -295,6 +295,11 @@ H5CC = $(bindir)/h5cc 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. +MOSTLYCLEANFILES = *.chkexe *.chksh dsetf[1-4].h5 f1img.h5 f1tab.h5 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/hl/src AM_FCFLAGS = -I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/hl/fortran/src @@ -310,9 +315,6 @@ tstlite_SOURCES = tstlite.f90 tstimage_SOURCES = tstimage.f90 tsttable_SOURCES = tsttable.f90 -# Temporary files. -MOSTLYCLEANFILES = dsetf[1-4].h5 f1img.h5 f1tab.h5 - # 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 @@ -325,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: @@ -575,9 +581,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; \ @@ -604,71 +610,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" \ @@ -681,40 +699,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/hl/src/Makefile.in b/hl/src/Makefile.in index 54e9e0e..659bdc7 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -294,6 +294,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 + # Add include directories to the C preprocessor flags AM_CPPFLAGS = -I$(top_srcdir)/src @@ -316,6 +319,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: @@ -539,6 +546,7 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -621,9 +629,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; \ @@ -650,71 +658,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" \ @@ -727,40 +747,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/hl/test/Makefile.am b/hl/test/Makefile.am index 293c58c..4f36b7d 100644 --- a/hl/test/Makefile.am +++ b/hl/test/Makefile.am @@ -22,7 +22,7 @@ TEST_PROG=test_lite test_image test_table test_ds test_packet check_PROGRAMS=$(TEST_PROG) # Temporary files. These files are the ones created by running `make test'. -MOSTLYCLEANFILES=combine_tables[1-2].h5 test_ds[1-6].h5 test_image[1-3].h5 \ +MOSTLYCLEANFILES+=combine_tables[1-2].h5 test_ds[1-6].h5 test_image[1-3].h5 \ test_lite[1-2].h5 test_table.h5 test_packet_table.h5 include $(top_srcdir)/config/conclude.am diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 728ed76..00dea35 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -306,6 +306,13 @@ 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. These files are the ones created by running `make test'. +MOSTLYCLEANFILES = *.chkexe *.chksh combine_tables[1-2].h5 \ + test_ds[1-6].h5 test_image[1-3].h5 test_lite[1-2].h5 \ + test_table.h5 test_packet_table.h5 + # Add include directories to C preprocessor flags AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/hl/src @@ -316,11 +323,6 @@ LDADD = $(LIBH5_HL) $(LIBHDF5) # order to be executed, generally most specific tests to least specific tests. TEST_PROG = test_lite test_image test_table test_ds test_packet -# Temporary files. These files are the ones created by running `make test'. -MOSTLYCLEANFILES = combine_tables[1-2].h5 test_ds[1-6].h5 test_image[1-3].h5 \ - test_lite[1-2].h5 test_table.h5 test_packet_table.h5 - - # 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 @@ -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: @@ -609,9 +615,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; \ @@ -638,71 +644,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" \ @@ -715,40 +733,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/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 9574696..6cdaaac 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/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 |