summaryrefslogtreecommitdiffstats
path: root/c++/test/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test/Makefile.in')
-rw-r--r--c++/test/Makefile.in84
1 files changed, 65 insertions, 19 deletions
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 30eb6db..5167c34 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -304,7 +304,16 @@ H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
# .chkexe and .chksh files are used to mark tests that have run successfully.
-MOSTLYCLEANFILES = *.chkexe *.chksh
+# Serial tests create .log and .logsh files. It's important only to clean log
+# files generated by HDF5's tests, because the .log suffix is used for
+# other files (e.g., config.log)!
+MOSTLYCLEANFILES = $(TEST_PROG_CHKEXE:.chkexe_=.chkexe) \
+ $(TEST_PROG_PARA_CHKEXE:.chkexe_=.chkexe) \
+ $(TEST_SCRIPT_CHKSH:.chksh_=.chksh) \
+ $(TEST_SCRIPT_PARA_CHKSH:.chksh_=.chksh) \
+ $(TEST_PROG_CHKEXE:.chkexe_=.log) \
+ $(TEST_SCRIPT_CHKSH:.chksh_=.logsh)
+
# Include src, test, and c++/src directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
@@ -577,7 +586,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
+ mostlyclean-libtool mostlyclean-local
pdf: pdf-am
@@ -598,20 +607,36 @@ uninstall-am: uninstall-info-am
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
-
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am
+
+
+# check-install is a synonym for installcheck.
+# Add this build rule here (rather than in conclude.am, where build rules
+# normally go) because it should be included in the top-level Makefile.am
+# as well.
+check-install: installcheck
+
+# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that
+# holds *.ii files, which are template entity instantiations.
+# This entire directory should be cleaned.
+mostlyclean-local:
+ if test -d ii_files; then \
+ $(RM) -rf ii_files; \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-build-lib: $(LIB)
-build-progs: $(LIB) $(PROGS)
-build-tests: $(LIB) $(PROGS) $(TESTS)
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., Fortran type detection)
+build-lib: $(BUILT_SOURCES) $(LIB)
+build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
+build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
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 \
+ if test $$d != X && test $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
@@ -623,6 +648,8 @@ all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is depreciated.
install-doc uninstall-doc:
@echo "Nothing to be done."
@@ -651,8 +678,15 @@ build-check-s: $(LIB) $(PROGS) $(TESTS)
fi
_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+ @for d in dummy $(TEST_PROG_CHKEXE:.chkexe_=.log) \
+ $(TEST_SCRIPT_CHKSH:.chksh_=.logsh); do \
+ if test $$d != dummy && test $$d != .log && \
+ test $$d != .logsh; then \
+ cat `basename $$d`; \
+ fi; \
+ done
-# The .chkexe_ here is the "dummy" that prevents the target from being
+# The dummy.chkexe here prevents the target from being
# empty if there are no tests in the current directory.
$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
@if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
@@ -660,26 +694,32 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $(@:.chkexe_=)$(EXEEXT); then \
echo "No need to test $(@:.chkexe_=)$(EXEEXT) again."; \
else \
+ echo "============================" > $(@:.chkexe_=.log); \
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
echo "Fortran API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ echo "Fortran API: $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) Test Log" >> $(@:.chkexe_=.log); \
elif test "X$(HDF_CXX)" = "Xyes"; then \
echo "C++ API: Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ echo "C++ API: $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) Test Log" >> $(@:.chkexe_=.log);\
else \
echo "Testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
+ echo "$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) Test Log" >> $(@:.chkexe_=.log); \
fi; \
- echo "============================"; \
+ echo "============================" >> $(@:.chkexe_=.log); \
srcdir="$(srcdir)" \
- $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) \
+ $(RUNTESTS) ./$(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS) 2>&1 >> $(@:.chkexe_=.log) \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- exit 1; \
- echo ""; \
+ (cat $(@:.chkexe_=.log) && false) || exit 1; \
+ echo "" >> $(@:.chkexe_=.log); \
+ echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)" >> $(@:.chkexe_=.log); \
+ echo "============================" >> $(@:.chkexe_=.log); \
echo "Finished testing $(@:.chkexe_=)$(EXEEXT) $(TEST_FLAGS)"; \
fi; \
echo "============================"; \
fi
-# The .chksh_ here is the "dummy" that prevents the target from being
+# The dummy.chksh here prevents the target from being
# empty if there are no tests in the current directory.
$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummy.chksh_:
@if test "X$@" != "X.chksh_" && test "X$@" != "Xdummy.chksh_"; then \
@@ -687,21 +727,27 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummy.chksh_:
if $(top_srcdir)/bin/newer `basename $(@:.chksh_=.chksh)` $(@:.chksh_=); then \
echo "No need to test `basename $(@:.chksh_=)` again."; \
else \
+ echo "============================" > `basename $(@:.chksh_=.logsh)`; \
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
echo "Fortran API: Testing `basename $(@:.chksh_=)` $(TEST_FLAGS)"; \
+ echo "Fortran API: `basename $(@:.chksh_=)` $(TEST_FLAGS) Test Log" >> `basename $(@:.chksh_=.logsh)`; \
elif test "X$(HDF_CXX)" = "Xyes"; then \
echo "C++ API: Testing `basename $(@:.chksh_=)` $(TEST_FLAGS)"; \
+ echo "C++ API: `basename $(@:.chksh_=)` $(TEST_FLAGS) Test Log" >> `baename $(@:.chksh_=.logsh)`; \
else \
echo "Testing `basename $(@:.chksh_=)` $(TEST_FLAGS)"; \
+ echo "`basename $(@:.chksh_=)` $(TEST_FLAGS) Test Log" >> `basename $(@:.chksh_=.logsh)`; \
fi; \
- echo "============================"; \
+ echo "============================" >> `basename $(@:.chksh_=.logsh)`; \
RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
srcdir="$(srcdir)" \
- $(SHELL) $(@:.chksh_=) $(TEST_FLAGS) \
+ $(SHELL) $(@:.chksh_=) $(TEST_FLAGS) 2>&1 >> `basename $(@:.chksh_=.logsh)` \
&& touch `basename $(@:.chksh_=.chksh)` || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- exit 1; \
- echo ""; \
+ (cat `basename $(@:.chksh_=.logsh)` && false) || exit 1; \
+ echo "" >> `basename $(@:.chksh_=.logsh)`; \
+ echo "Finished testing `basename $(@:.chksh_=)` $(TEST_FLAGS)" >> `basename $(@:.chksh_=.logsh)`; \
+ echo "============================" >> `basename $(@:.chksh_=.logsh)`; \
echo "Finished testing `basename $(@:.chksh_=)` $(TEST_FLAGS)"; \
fi; \
echo "============================"; \