From 7c1e888bde6c2c3c345f37022099e1f294267f3c Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 19 Sep 2000 11:53:34 -0500 Subject: [svn-r2572] Purpose: Feature Description: Most tests are done inside a for-loop. Whenever a test exits with error, the for-loop does a "exit 1" to exit the make. "make -i" could not catch and ignore the error status. Solution: Replaced "exit 1" with break. At the end of the for-loop, test if all tests have been run. If not, the for-loop is ended by the break command, thus raise an error. Now, 'make -i' can catch and ignor it. Also added the test of variable HDF5_Make_Ignore inside the for-loop to indicate the desire to ignore errors when the HDF5_Make_Ignore is set to a non-null/blank string. Platforms: Tested on modi4 and eirene. --- config/conclude.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/config/conclude.in b/config/conclude.in index 8965987..bba94a1 100644 --- a/config/conclude.in +++ b/config/conclude.in @@ -19,6 +19,8 @@ TAGS: $(LIB_SRC) -etags $(LIB_SRC) ## Runs each test in order, passing $(TEST_FLAGS) to the program. +## 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) check test _test: tests @for test in $(TEST_PROGS) dummy; do \ @@ -28,10 +30,12 @@ check test _test: tests echo "============================"; \ PATH=".:$$PATH" 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 "============================"; \ @@ -40,10 +44,12 @@ check test _test: tests 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): -- cgit v0.12