Hello, another API question turned up:
do we want the developer to specify dependencies between tests as foo.log: bar.log or as foo_log_DEPENDENCIES = bar.log There are reasons for^W^Wproblems with both: - *_DEPENDENCIES can also work when tests do not use a suffix listed in TEST_EXTENSIONS. Remember that Automake does not output its own rules for rules it finds overridden, and that for this decision, it does not distinguish between rules and dependency statements without commands. - *_DEPENDENCIES is however difficult to realize for tests that are @substituted@ (and thus necessarily have a known extension, but we may not know which names to match the `*' in `*_DEPENDENCIES' with). The current realization that I have in mind would be to add them would be to let each target rule depend by default: foo.log: foo $(foo_log_DEPENDENCIES) ... and to add extra rules on a as-seen basis for inference rules: if, for bar.test and `TEST_EXTENSIONS = .test', we see a definition of bar_log_DEPENDENCIES, we output both .test.log: ... bar.test: $(bar_log_DEPENDENCIES) For `TESTS = @substed@', we'd however have to invent literal EXTRA_TESTS or so now, so that we can reliably find all possible <LOG>_DEPENDENCIES variables. That seems like a step in the wrong direction. The alternative would be the restricting doc patch below; I am considering adding that now, and deferring the rest until a later release. Comments welcome! Thanks, Ralf manual: Add note about parallelism and tests ordering. * doc/automake.texi (Simple Tests using parallel-tests): Dependencies between test logs work for tests with known extensions only. Hint that tests should be prepared to be run in parallel. diff --git a/doc/automake.texi b/doc/automake.texi index 06d1806..1f6e935 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -8652,7 +8652,13 @@ foo-execute.log: foo-compile.log @noindent Please note that this ordering ignores the @emph{results} of required tests, thus the test @file{foo-execute.test} is run even if the test -...@file{foo-compile.test} failed or was skipped beforehand. +...@file{foo-compile.test} failed or was skipped beforehand. Further, +please note that specifying such dependencies currently works only for +tests that end in one of the suffixes listed in @code{TEST_EXTENSIONS}. + +Tests without such specified dependencies may be run concurrently with +parallel @command{make -...@var{n}}, so be sure they are prepared for +concurrent execution. @cindex Unit tests The combination of lazy test execution and correct dependencies between