summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-07-21 19:28:11 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-07-21 19:28:11 (GMT)
commit7236935a9d666926b5843f317a84743ef3d4126a (patch)
tree21d7f4f7d0fbc1348c374ba39f9b2ca095841e81 /test
parentbb31e94a924a1b3f6f1da6c10ffe95029c87d5c5 (diff)
downloadhdf5-7236935a9d666926b5843f317a84743ef3d4126a.zip
hdf5-7236935a9d666926b5843f317a84743ef3d4126a.tar.gz
hdf5-7236935a9d666926b5843f317a84743ef3d4126a.tar.bz2
[svn-r11095] Purpose:
Configuration feature Description: Serial test output is now stored in log files and printed when all tests in a directory complete, or when a test fails. This should make test output more readable and useful. Also made changes to clean up ii_files directories that are created by some C++ compilers/linkers. Also fixed a few minor Makefile bugs. Solution: When serial tests run, their output is saved in *.log or *.logsh. While running, tests only print when they begin and when they complete; their more specific output (from the log file) is printed if the test fails or when all tests have completed. Comments welcome. Platforms tested: mir, modi4 (parallel and serial), copper, shanti
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in94
2 files changed, 70 insertions, 28 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 6247d1a..a6693fe 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -29,7 +29,9 @@ check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
-TEST_PROG=testhdf5 lheap ohdr stab gheap cache b+tree btree2 blocktrack sheap \
+# As an exception, long-running tests should occur earlier in the list.
+# This gives them more time to run when tests are executing in parallel.
+TEST_PROG=testhdf5 lheap ohdr stab gheap btree2 cache b+tree blocktrack sheap \
pool hyperslab istore bittests dt_arith \
dtypes dsets cmpd_dset extend external links unlink big mtime \
fillval mount flush1 flush2 enum \
diff --git a/test/Makefile.in b/test/Makefile.in
index ce95a9b..df37afe 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -71,8 +71,8 @@ libh5test_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libh5test_la_OBJECTS = h5test.lo testframe.lo
libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS)
am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \
- stab$(EXEEXT) gheap$(EXEEXT) cache$(EXEEXT) b+tree$(EXEEXT) \
- btree2$(EXEEXT) blocktrack$(EXEEXT) sheap$(EXEEXT) \
+ stab$(EXEEXT) gheap$(EXEEXT) btree2$(EXEEXT) cache$(EXEEXT) \
+ b+tree$(EXEEXT) blocktrack$(EXEEXT) sheap$(EXEEXT) \
pool$(EXEEXT) hyperslab$(EXEEXT) istore$(EXEEXT) \
bittests$(EXEEXT) dt_arith$(EXEEXT) dtypes$(EXEEXT) \
dsets$(EXEEXT) cmpd_dset$(EXEEXT) extend$(EXEEXT) \
@@ -493,22 +493,31 @@ H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
# .chkexe and .chksh files are used to mark tests that have run successfully.
+# 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)!
# Temporary files. These files are the ones created by setting the
# HDF5_NOCLEANUP environment variable and running `make test' without
# specifying a file prefix or low-level driver. Changing the file
# prefix or low-level driver with environment variables will influence
# the temporary file name in ways that the makefile is not aware of.
-MOSTLYCLEANFILES = *.chkexe *.chksh cmpd_dset.h5 compact_dataset.h5 \
- dataset.h5 extend.h5 istore.h5 tfile[1-4].h5 th5s[1-3].h5 \
- lheap.h5 ohdr.h5 stab[1-2].h5 extern_[1-3].h5 \
- extern_[1-4][ab].raw gheap[0-4].h5 dt_arith[1-2] links.h5 \
- links[1-3].h5 big.data big[0-9][0-9][0-9][0-9][0-9].h5 \
- dtypes[1-8].h5 dt_arith[1-2].h5 tattr.h5 tselect.h5 mtime.h5 \
- unlink.h5 unicode.h5 fillval_[0-9].h5 fillval.raw \
- mount_[0-9].h5 testmeta.h5 ttime.h5 trefer[1-3].h5 tvltypes.h5 \
- tvlstr.h5 tvlstr2.h5 flush.h5 enum1.h5 titerate.h5 ttsafe.h5 \
- tarray1.h5 tgenprop.h5 tmisc[0-9]*.h5 set_extent_read.h5 \
+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) cmpd_dset.h5 \
+ compact_dataset.h5 dataset.h5 extend.h5 istore.h5 \
+ tfile[1-4].h5 th5s[1-3].h5 lheap.h5 ohdr.h5 stab[1-2].h5 \
+ extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \
+ dt_arith[1-2] links.h5 links[1-3].h5 big.data \
+ big[0-9][0-9][0-9][0-9][0-9].h5 dtypes[1-8].h5 \
+ dt_arith[1-2].h5 tattr.h5 tselect.h5 mtime.h5 unlink.h5 \
+ unicode.h5 fillval_[0-9].h5 fillval.raw mount_[0-9].h5 \
+ testmeta.h5 ttime.h5 trefer[1-3].h5 tvltypes.h5 tvlstr.h5 \
+ tvlstr2.h5 flush.h5 enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 \
+ tgenprop.h5 tmisc[0-9]*.h5 set_extent_read.h5 \
set_extent_create.h5 getname.h5 getname[1-3].h5 sec2_file.h5 \
family_file000[0-3][0-9].h5 multi_file-[rs].h5 core_file \
new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 \
@@ -523,7 +532,9 @@ check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
-TEST_PROG = testhdf5 lheap ohdr stab gheap cache b+tree btree2 blocktrack sheap \
+# As an exception, long-running tests should occur earlier in the list.
+# This gives them more time to run when tests are executing in parallel.
+TEST_PROG = testhdf5 lheap ohdr stab gheap btree2 cache b+tree blocktrack sheap \
pool hyperslab istore bittests dt_arith \
dtypes dsets cmpd_dset extend external links unlink big mtime \
fillval mount flush1 flush2 enum \
@@ -1023,6 +1034,12 @@ uninstall-am: uninstall-info-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
+
# Additional target for running timing test
timings _timings: testmeta
@for timing in $(TIMINGS) dummy; do \
@@ -1037,14 +1054,16 @@ flush2.chkexe_: flush1.chkexe_
# 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
@@ -1056,6 +1075,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."
@@ -1084,8 +1105,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 \
@@ -1093,26 +1121,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 \
@@ -1120,21 +1154,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 "============================"; \