summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMax Maischein <corion@corion.net>2009-06-11 14:07:49 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-06-11 16:16:13 +0200
commit7019aa112619d31a5da7424af179f4edcd836a96 (patch)
treef31a3b35b771d4bb07db3aaf9926b209ea372ec8 /t
parentcc650b8bbbaccae45531080d9ec8179f81184705 (diff)
downloadperl-7019aa112619d31a5da7424af179f4edcd836a96.tar.gz
Add t/benchmark to tests run if $ENV{PERL_BENCHMARK} is set
Diffstat (limited to 't')
-rwxr-xr-xt/TEST2
-rw-r--r--t/harness1
2 files changed, 3 insertions, 0 deletions
diff --git a/t/TEST b/t/TEST
index 4e86fd0291..9af8baaac1 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 5e5ddf4c82..8225d1b728 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 => [