From: Max Maischein Date: Thu, 11 Jun 2009 12:07:49 +0000 (+0200) Subject: Add t/benchmark to tests run if $ENV{PERL_BENCHMARK} is set X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7019aa112619d31a5da7424af179f4edcd836a96;p=p5sagit%2Fp5-mst-13.2.git Add t/benchmark to tests run if $ENV{PERL_BENCHMARK} is set --- diff --git a/t/TEST b/t/TEST index 4e86fd0..9af8baa 100755 --- a/t/TEST +++ b/t/TEST @@ -25,6 +25,7 @@ our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0; my @argv = (); foreach my $idx (0..$#ARGV) { push( @argv, $ARGV[$idx] ), next unless $ARGV[$idx] =~ /^-(\S+)$/; + $::benchmark = 1 if $1 eq 'benchmark'; $::core = 1 if $1 eq 'core'; $::verbose = 1 if $1 eq 'v'; $::torture = 1 if $1 eq 'torture'; @@ -169,6 +170,7 @@ unless (@ARGV) { _find_tests('pod'); _find_tests('x2p'); _find_tests('japh') if $::torture; + _find_tests('t/benchmark') if $::benchmark or $ENV{PERL_BENCHMARK}; } } diff --git a/t/harness b/t/harness index 5e5ddf4..8225d1b 100644 --- a/t/harness +++ b/t/harness @@ -148,6 +148,7 @@ if (@ARGV) { my @next = qw(comp cmd run io op uni mro lib); push @next, 'japh' if $torture; push @next, 'win32' if $^O eq 'MSWin32'; + push @next, 'benchmark' if $ENV{PERL_BENCHMARK}; # Hopefully TAP::Parser::Scheduler will support this syntax soon. # my $next = { par => '{' . join (',', @next) . '}/*.t' }; my $next = { par => [