This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add more parallelism to t/harness
authorKarl Williamson <khw@cpan.org>
Wed, 25 Jul 2018 02:26:39 +0000 (20:26 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 14 Nov 2018 16:04:45 +0000 (09:04 -0700)
commit9b0adf193cf9b592bf4162895b7fe90a3aa2aa2b
tree70dca2bbe1ca53206b738139bf77bedb11b5f013
parentbb6e76f0bf2e379480796380f1dc705e6cfffbff
Add more parallelism to t/harness

This commit causes test files in cpan/, etc to run in parallel provided
there is no file in the test directory whose name begins with zero.
Experience shows that things like 01test, 02test, ... are supposed to be
executed serially.  Sometimes there is a single file beginning with 0,
and this is supposed to be executed first as setup for the remaining
tests (which probably could be executed in parallel, but that
enhancement is much harder to do, so isn't tried here)

This is a heuristic, and this commit adds the ability to explicitly
specify directories to the serial list that don't correspond to the
above rule.  One directory is currently on that list: ext/Pod-Html/t.
It follows a different paradigm to order things.  We could rename the
tests to follow the normal paradigm since this is in ext/, but I thought
it best to keep it as an example of what to do should the need for other
exceptions arise.

This can save a bunch of wallclock time on slower systems with many
cores, such as dromedary.  On that system, the test suite finishes 17%
faster with this commit on the first run.  (This is a savings of over
100 wallclock seconds; a very noticeable improvement.)  On subsequent
runs when it knows approximately how long each test takes and sorts the
order accordingly, the suite runs 8% faster.

On machines with few cores, there isn't much of a difference.
t/harness