Skip to content

Commit

Permalink
App::perlbrew: use "test_harness" on perl >=5.7.3
Browse files Browse the repository at this point in the history
Change the default perlbrew behavior so that it now tests via "make
test_harness" instead of "make test" if the "test_harness" target is available.

With the "test_harness" target we'll get automatic parallel testing
via $HARNESS_OPTIONS.

The + "test_harness" target was added in 5.7.3, which was the last
development release before 5.8.0.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  • Loading branch information
avar committed Dec 20, 2010
1 parent 9177fd2 commit 4eca574
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/App/perlbrew.pm
Expand Up @@ -443,7 +443,16 @@ INSTALL
$configure_flags = '-de';
}

my @install = $self->{notest} ? "make install" : ("make test", "make install");
# Test via "make test_harness" if available so we'll get
# automatic parallel testing via $HARNESS_OPTIONS. The
# "test_harness" target was added in 5.7.3, which was the last
# development release before 5.8.0.
my $test_target = "test";
if ($dist_version =~ /^5\.(\d+)\.(\d+)/
&& ($1 >= 8 || $1 == 7 && $2 == 3)) {
$test_target = "test_harness";
}
my @install = $self->{notest} ? "make install" : ("make $test_target", "make install");
@install = join " && ", @install unless($self->{force});

my $cmd = join ";",
Expand Down

0 comments on commit 4eca574

Please sign in to comment.