diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-22 21:34:36 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-22 21:44:46 +0100 |
commit | a7db2b5cb7da80935fd700d437d058a23e84b3b6 (patch) | |
tree | 7c60e00b07344a0c4c95bce7025bd564116499e4 | |
parent | 3ddc09e857296d43ac7e03fa38c92134c37b0b94 (diff) | |
download | automake-a7db2b5cb7da80935fd700d437d058a23e84b3b6.tar.gz |
[ng] parallel-tests: improve detection of circular dependencies
* lib/am/parallel-tests.mk (am.test-suite.runtest): Here.
($(TEST_SUITE_LOG)): Drop redundant and non-workinf code.
Fixes a long-standing failure in test 't/parallel-tests-fork-bomb.sh'.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r-- | lib/am/parallel-tests.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/am/parallel-tests.mk b/lib/am/parallel-tests.mk index 06f949f72..c1fb69f16 100644 --- a/lib/am/parallel-tests.mk +++ b/lib/am/parallel-tests.mk @@ -32,6 +32,10 @@ am.test-suite.is-xfail = \ am.test-suite.runtest = \ $(am.test-suite.tty-colors); \ + if test '$(TEST_SUITE_LOG)' = '$*.log'; then \ + echo "fatal: $*.log: depends on itself (check TESTS content)" >&2; \ + exit 1; \ + fi; \ srcdir=$(srcdir); export srcdir; \ ## Creates the directory for the log file if needed. Avoid extra forks. test x$(@D) = x. || test -d $(@D) || $(MKDIR_P) $(@D) || exit $$?; \ @@ -318,9 +322,6 @@ $(TEST_SUITE_LOG): $(am.test-suite.test-logs) $(am.test-suite.test-results) @set +e; $(am.test-suite.tty-colors); \ fatal () { echo "fatal: making $@: $$*" >&2; exit 1; }; \ workdir='$(am.test-suite.workdir)'; \ -## Detect a possible circular dependency, and error out if it's found. - grep '^$(TEST_SUITE_LOG:.log=)$$' $$workdir/bases \ - && fatal "depends on itself (check TESTS content)"; \ ## Prepare data for the test suite summary. These do not take into account ## unreadable test results, but they'll be appropriately updated later if ## needed. |