From d4c5a3af25574faa40b6b14766e1a1d93c12b79a Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 31 May 2005 01:55:03 -0500 Subject: [svn-r10828] Purpose: feature. Description: Added two new make check targets, check-s: serial tests check-p: parallel tests. Check will run check-s and check-p, have the same effect as before. Added $TEST_SCRIPTS_PARA for parallel test scripts. Platforms tested: h5committested". Also, tested in heping (serial and pp) to verify with previous test output for consistency. Tested in modi4 for the special case of pmake (in progress.) --- c++/config/conclude.in | 25 ++++++++++++++++ config/commence.in | 1 + config/conclude.in | 43 +++++++++++++++++++++++----- fortran/Makefile.in | 2 +- fortran/config/commence.in | 2 ++ fortran/config/conclude.in | 71 +++++++++++++++++++++++++++++++++++++++++++--- hl/Makefile.in | 2 +- testpar/Makefile.in | 2 +- tools/Makefile.in | 2 +- 9 files changed, 135 insertions(+), 15 deletions(-) diff --git a/c++/config/conclude.in b/c++/config/conclude.in index e5a50c7..4dcbc80 100644 --- a/c++/config/conclude.in +++ b/c++/config/conclude.in @@ -22,7 +22,27 @@ TAGS: $(LIB_SRC) ## Since tests are done in a shell loop, "make -i" does apply inside it. ## Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. tests: $(TEST_PROGS) $(LIB) + +## Same as check-s since there is no Parallel C++ tests yet. check test _test: tests + @echo "===C++ tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + @echo "===C++ tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## serial tests +check-s: tests + @echo "===Serial C++ tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + @echo "===Serial C++ tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## parallel tests +check-p: tests + @echo "===Parallel C++ tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-p + @echo "===Parallel C++ tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## Actual execution of sequtial tests. +_check-s: tests @for test in $(TEST_PROGS) dummy; do \ if test $$test != dummy; then \ echo ""; \ @@ -52,6 +72,11 @@ check test _test: tests done; \ test $$test = dummy || false +## Actual execution of parallel tests. +## No parallel C++ tests yet. Just a dummy target. +_check-p: tests + + ## Make installation directories directories if they don't exist. $(libdir): $(top_srcdir)/bin/mkdirs $@ diff --git a/config/commence.in b/config/commence.in index 7328296..0b2559a 100644 --- a/config/commence.in +++ b/config/commence.in @@ -74,6 +74,7 @@ PRIV_PROGS= TEST_PROGS_PARA= TEST_FLAGS= TEST_SCRIPTS= +TEST_SCRIPTS_PARA= AUX_LIB= EXAMPLE_PROGS= SUBDIRS= diff --git a/config/conclude.in b/config/conclude.in index 587a48e..9dd57d3 100644 --- a/config/conclude.in +++ b/config/conclude.in @@ -37,6 +37,24 @@ TAGS: $(LIB_SRC) tests: $(TEST_PROGS) $(TEST_PROGS_PARA) $(TEST_SCRIPTS) $(LIB) check test _test: tests @echo "===Tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + $(MAKE) _check-p + @echo "===Tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## serial tests +check-s: tests + @echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + @echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## parallel tests +check-p: tests + @echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-p + @echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## Actual execution of sequtial tests. +_check-s: tests @for test in $(TEST_PROGS) dummy; do \ if test $$test != dummy; then \ echo "============================"; \ @@ -50,6 +68,23 @@ check test _test: tests fi; \ done; \ test $$test = dummy || false + @for test in $(TEST_SCRIPTS) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + 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 + +## Actual execution of parallel tests. +_check-p: tests @if test -n "$(TEST_PROGS_PARA)"; then \ echo "**** Hint ****"; \ echo "Parallel test files reside in the current directory" \ @@ -73,7 +108,7 @@ check test _test: tests fi; \ done; \ test $$test = dummy || false - @for test in $(TEST_SCRIPTS) dummy; do \ + @for test in $(TEST_SCRIPTS_PARA) dummy; do \ if test $$test != dummy; then \ echo "============================"; \ echo "Testing $$test $(TEST_FLAGS)"; \ @@ -87,12 +122,6 @@ check test _test: tests fi; \ done; \ test $$test = dummy || false - @echo "===Tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" - @for d in X $(SUBDIRS); do \ - if test $$d != X; then \ - (set -x; cd $$d && $(MAKE) tests) || exit 1; \ - fi; \ - done ## Run test with different Virtual File Driver check-vfd: diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 63a4177..acea2a7 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -73,7 +73,7 @@ SUBDIRS=src test @TESTPARALLEL@ ## programs and C compilers. At the other extreme, the GNU ## make used in combination with gcc will maintain dependency ## information automatically. -lib progs check test _test uninstall: +lib progs check check-s check-p test _test uninstall: @@SETX@; for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@) || exit 1; \ done diff --git a/fortran/config/commence.in b/fortran/config/commence.in index b3d4f6e..25d4e45 100644 --- a/fortran/config/commence.in +++ b/fortran/config/commence.in @@ -77,8 +77,10 @@ PUB_HDR= PUB_PROGS= PROGS= TEST_PROGS= +TEST_PROGS_PARA= TEST_FLAGS= TEST_SCRIPTS= +TEST_SCRIPTS_PARA= AUX_LIB= EXAMPLE_PROGS= SUBDIRS= diff --git a/fortran/config/conclude.in b/fortran/config/conclude.in index 3f644fc..53a3b69 100644 --- a/fortran/config/conclude.in +++ b/fortran/config/conclude.in @@ -21,6 +21,25 @@ TAGS: $(LIB_SRC) ## Runs each test in order, passing $(TEST_FLAGS) to the program. tests: $(TEST_PROGS) $(LIB) check test _test: tests + @echo "===Fortran tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + $(MAKE) _check-p + @echo "===Fortran tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## serial tests +check-s: tests + @echo "===Serial Fortran tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-s + @echo "===Serial Fortran tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## parallel tests +check-p: tests + @echo "===Parallel Fortran tests in `echo ${PWD} | sed -e s:.*/::` begin `date`===" + $(MAKE) _check-p + @echo "===Parallel Fortran tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===" + +## Actual execution of sequtial tests. +_check-s: tests @for test in $(TEST_PROGS) dummy; do \ if test $$test != dummy; then \ echo "============================"; \ @@ -28,22 +47,66 @@ check test _test: tests echo "============================"; \ srcdir="$(srcdir)" \ $(RUNTEST) ./$$test $(TEST_FLAGS) || \ - exit 1; \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ echo ""; \ fi; \ - done; + done; \ + test $$test = dummy || false @for test in $(TEST_SCRIPTS) dummy; do \ if test $$test != dummy; then \ echo "============================"; \ echo "Testing $$test $(TEST_FLAGS)"; \ 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 + +## Actual execution of parallel tests. +_check-p: tests + @if test -n "$(TEST_PROGS_PARA)"; then \ + echo "**** Hint ****"; \ + echo "Parallel test files reside in the current directory" \ + "by default."; \ + echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ + echo " HDF5_PARAPREFIX=/PFS/user/me"; \ + echo " export HDF5_PARAPREFIX"; \ + echo " make check"; \ + echo "**** end of Hint ****"; \ + fi + @for test in $(TEST_PROGS_PARA) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + echo "============================"; \ srcdir="$(srcdir)" \ + $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ + echo ""; \ + fi; \ + done; \ + test $$test = dummy || false + @for test in $(TEST_SCRIPTS_PARA) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + echo "============================"; \ + RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ + srcdir="$(srcdir)" \ /bin/sh $$test $(TEST_FLAGS) || \ - exit 1; \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ echo ""; \ fi; \ - done; + done; \ + test $$test = dummy || false ## Make installation directories directories if they don't exist. $(libdir): diff --git a/hl/Makefile.in b/hl/Makefile.in index 68564d7..d119711 100755 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -56,7 +56,7 @@ SUBDIRS=src test ## programs and C compilers. At the other extreme, the GNU ## make used in combination with gcc will maintain dependency ## information automatically. -lib progs check test _test uninstall: +lib progs check check-s check-p test _test uninstall: @@SETX@; for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@) || exit 1; \ done diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 31850b6..f1f3363 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -30,7 +30,7 @@ RUNTEST=$(RUNPARALLEL) ## Test programs and scripts. ## TEST_PROGS_PARA=t_mpi testphdf5 -TEST_SCRIPTS=testph5.sh +TEST_SCRIPTS_PARA=testph5.sh ## These are our main targets PROGS=$(TEST_PROGS_PARA) diff --git a/tools/Makefile.in b/tools/Makefile.in index 7b0df04..2a7a561 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -61,7 +61,7 @@ dep depend: fi; \ done -check tests test _test: $(PROGS) +check check-s check-p tests test _test: $(PROGS) @@SETX@; for d in X lib $(SUBDIRS); do \ if test $$d != X; then \ (cd $$d && $(MAKE) $@) || exit 1; \ -- cgit v0.12