From ea9417560bd818e31419b6fcbdf3d265a93f186a Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Tue, 7 Apr 2009 16:59:43 +0200 Subject: [PATCH] re-enable parallel testing in t/harness again Based on a patch by pmichaud++ Requires a sufficiently recent Test::Harness. For example the harness works fine with 3.12, but for parallelism you need something newer, 3.16 seems to work. --- t/harness | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/t/harness b/t/harness index 53eee59beec..dc68e9aa886 100644 --- a/t/harness +++ b/t/harness @@ -23,6 +23,7 @@ GetOptions( 'jobs:3' => \my $jobs, 'icu:1' => \my $do_icu, ); + my @pass_through_options = grep m/^--?[^-]/, @ARGV; my @files = grep m/^[^-]/, @ARGV; @@ -54,7 +55,17 @@ if ($do_fudge) { @tfiles = fudge(@tfiles); } -runtests(@tfiles); +if (eval { require TAP::Harness; 1 }) { + my %harness_options = ( + exec => ['./perl6'], + verbosity => 0+$Test::Harness::verbose, + jobs => $jobs || 1, + ); + TAP::Harness->new( \%harness_options )->runtests(@tfiles); +} +else { + runtests(@tfiles); +} # adapted to return only files ending in '.t' sub all_in {