[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-ng] [PATCH 07/10] [ng] tests: run long-running ones early (use
From: |
Stefano Lattarini |
Subject: |
[Automake-ng] [PATCH 07/10] [ng] tests: run long-running ones early (useful with parallel make) |
Date: |
Mon, 23 Apr 2012 11:57:25 +0200 |
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 <address@hidden>
---
Makefile.am | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 7b892fb..fafe586 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -344,11 +344,26 @@ EXTRA_DIST += t/ax/is
# All tests, both hand-written and autogenerated.
# IMPORTANT: This assumes that the autogenerated tests are placed
# in the $(srcdir) as well!
-TESTS = \
+all_TESTS = \
$(wildcard $(srcdir)/t/*.sh) \
$(wildcard $(srcdir)/t/*.tap) \
$(wildcard $(srcdir)/t/pm/*.pl)
+# This is to ensure longer-running tests will be run earlier, which is
+# useful when running the testsuite in parallel on multicore machines.
+# Here too we assume that the autogenerated tests are placed in $(srcdir).
+long_running_TESTS = \
+ $(srcdir)/t/add-missing.tap \
+ $(srcdir)/t/instspc.tap \
+ $(wildcard $(srcdir)/t/depcomp-*.tap) \
+ $(wildcard $(srcdir)/t/*libtool*.sh) \
+ $(wildcard $(srcdir)/t/lt*.sh) \
+ $(wildcard $(srcdir)/t/remake*.sh)
+
+TESTS = \
+ $(long_running_TESTS) \
+ $(filter-out $(long_running_TESTS), $(all_TESTS))
+
EXTRA_DIST += $(TESTS)
# FIXME: this "expected failures" are in truth an hack used to
--
1.7.9.5
- [Automake-ng] [PATCH 00/10] Rewrite parallel-tests to rely on GNU make capabilities, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 02/10] [ng] cleanup: simplify %transforms for parallel-tests handling, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 05/10] [ng] parallel-tests: support "TESTS = $(srcdir)/foo.test", Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 04/10] [ng] coverage: parallel-tests and dynamic $(TESTS) content, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 01/10] [ng] parallel-tests: simplify, using pattern rules with multiple targets, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 03/10] [ng] parallel-tests: simplify automake-time preprocessing, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 07/10] [ng] tests: run long-running ones early (useful with parallel make),
Stefano Lattarini <=
- [Automake-ng] [PATCH 06/10] [ng] build: define $(TESTS) through a wildcard, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 08/10] [ng] parallel-tests: remove obsolete comment, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 09/10] [ng] parallel-tests: fix confusing function names in Makefile recipes, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 10/10] [ng] tests: fix a spurious failure on Solaris 10, Stefano Lattarini, 2012/04/23
- Re: [Automake-ng] [PATCH 00/10] Rewrite parallel-tests to rely on GNU make capabilities, Stefano Lattarini, 2012/04/26