]> git.ipfire.org Git - thirdparty/automake.git/commit
[ng] tests: run long-running ones early (useful with parallel make)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Apr 2012 08:39:39 +0000 (10:39 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Apr 2012 09:39:40 +0000 (11:39 +0200)
commit7dbe3efd9f3a5937b92644303ab8d87761c687ca
tree42ae4d6cafbb197150f1459d998e972ab939e055
parent1690aca2063d8ba754e619681242324f09fa6635
[ng] tests: run long-running ones early (useful with parallel make)

For multicore machines, whenever running the testsuite in parallel, it
makes sense to start the longer-running tests earlier, to make better
use of the CPU parallelism (in particular, to minimize the possibility
that the test harness will be left stuck to wait a single tests to
finish, thus leaving all cores but one idle).

In the previous commit 'v1.11b-129-g1690aca', we started defining the
automake $(TESTS) through a call to the $(wildcard) function.  This has
many positive effects, but also the drawback that the tests are now
ordered randomly, so that there is an unpredictable possibility that
some long-running will be executed late, which is bad in light of what
explained above.

But luckily, we can be still able to ensure longer tests are run early,
by using a simple trick (which relies on those very GNU make features
that the parallel testsuite harness has only recently learned to grasp).

* Makefile.am (long_running_TESTS, all_TESTS): New variables.
(TESTS): Redefine in function of them, in a way that ensures the tests
in $(long_running_TESTS) are run first.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am