summaryrefslogtreecommitdiffstats
path: root/test/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile.in')
-rw-r--r--test/Makefile.in211
1 files changed, 102 insertions, 109 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index caeb4bc..9c1cec7 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -491,6 +491,30 @@ 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. 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 \
+ 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 \
+ err_compat.h5 dtransform.h5 test_filters.h5 get_file_name.h5 \
+ tstint[1-2].h5 unlink_chunked.h5 btree2.h5 blocktrack.h5 \
+ sheap.h5
INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
# Test script for error_test and err_compat
@@ -499,6 +523,7 @@ 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.
+# JAMES debug: removed btree2 and cache tests since they take so long.
TEST_PROG = testhdf5 lheap ohdr stab gheap cache btree2 blocktrack sheap \
pool hyperslab istore bittests dt_arith \
dtypes dsets cmpd_dset extend external links unlink big mtime \
@@ -525,28 +550,6 @@ ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c
ttsafe_acreate.c
-# 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 = 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 err_compat.h5 \
- dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
- unlink_chunked.h5 btree2.h5 blocktrack.h5 sheap.h5
-
-
# Sources for testhdf5 executable
testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tconfig.c tfile.c tgenprop.c \
th5s.c theap.c tid.c titerate.c tmeta.c tmisc.c ttime.c trefer.c trefstr.c \
@@ -565,6 +568,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:
@@ -1032,9 +1039,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; \
@@ -1061,71 +1068,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" \
@@ -1138,40 +1157,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