summaryrefslogtreecommitdiff
path: root/t/TEST
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-03-13 13:07:42 -0600
committerFather Chrysostomos <sprout@cpan.org>2011-09-09 20:15:52 -0700
commitb49055e966b614a7aa5d3eda7075ca3262694b6f (patch)
tree90bb9b306c559bc578d179d67d418ebae2ed8fa5 /t/TEST
parentf7b9b043ef957755618188c0c17f55142f7a3506 (diff)
downloadperl-b49055e966b614a7aa5d3eda7075ca3262694b6f.tar.gz
save elapsed-time-ms in global hash for later reporting
Diffstat (limited to 't/TEST')
-rwxr-xr-xt/TEST10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/TEST b/t/TEST
index 219a16fc2d..30abcf82b9 100755
--- a/t/TEST
+++ b/t/TEST
@@ -159,6 +159,7 @@ $ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL};
$ENV{EMXSHELL} = 'sh'; # For OS/2
if ($show_elapsed_time) { require Time::HiRes }
+my %timings = (); # testname => [@et] pairs if $show_elapsed_time.
my %skip = (
'.' => 1,
@@ -725,12 +726,11 @@ EOT
}
else {
if ($max) {
- my $elapsed;
+ my ($elapsed, $etms) = ("", 0);
if ( $show_elapsed_time ) {
- $elapsed = sprintf( " %8.0f ms", (Time::HiRes::time() - $test_start_time) * 1000 );
- }
- else {
- $elapsed = "";
+ $etms = (Time::HiRes::time() - $test_start_time) * 1000;
+ $elapsed = sprintf( " %8.0f ms", $etms);
+ $timings{$test} = $etms;
}
print "${te}ok$elapsed\n";
$good_files = $good_files + 1;