Skip to content

Commit

Permalink
re-enable parallel testing in t/harness again
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
moritz committed Apr 7, 2009
1 parent 2c7f5b3 commit ea94175
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/harness
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ea94175

Please sign in to comment.