This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/harness: Run APItests in parallel
authorKarl Williamson <khw@cpan.org>
Wed, 22 Mar 2017 03:52:33 +0000 (21:52 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 1 Jun 2017 13:05:15 +0000 (07:05 -0600)
This commit changes these tests to be run like the tests in t/lib, in
parallel with each other, when available.  This is the longest running
directory, and prior to this commit, on many-core systems it can be the
final thing chugging along, a test at-a-time, while the other cores are
idle.

t/harness

index 0ff4d85..3fc3ae0 100644 (file)
--- a/t/harness
+++ b/t/harness
@@ -163,7 +163,9 @@ if (@ARGV) {
                s,\\,/,g; # canonicalize path
            };
            # Treat every file matching lib/*.t as a "directory"
-           m!\A(\.\./lib/[^/]+\.t\z|.*[/])! or die "'$_'";
+           m! \A ( \.\. / (?: lib | ext/XS-APItest/t )
+                         / [^/]+ \.t \z | .* [/] ) !x
+                or die "'$_'";
            push @{$dir{$1}}, $_;
            $total_time{$1} += $times{$_} || 0;
        }