Skip to content

Commit

Permalink
[Test.pm] emit per-test timestamps only if PERL6_TEST_TIMES is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Berends committed May 8, 2010
1 parent 7810dbe commit 91501c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ multi sub plan($number_of_tests) is export {

say '1..' ~ $number_of_tests;
}
# say '# t=' ~ time;
# Emit two successive timestamps to measure the measurment overhead,
# and to eliminate cacheing bias, if it exists, from the first test.
say '# t=' ~ time if %*ENV{'PERL6_TEST_TIMES'};
say '# t=' ~ time if %*ENV{'PERL6_TEST_TIMES'};
}

multi sub pass($desc) is export {
Expand Down Expand Up @@ -223,7 +226,7 @@ sub proclaim($cond, $desc) {
print $todo_reason;
}
print "\n";
# say '# t=' ~ time;
say '# t=' ~ time if %*ENV{'PERL6_TEST_TIMES'};

if !$cond && $die_on_fail && !$todo_reason {
die "Test failed. Stopping test";
Expand Down

0 comments on commit 91501c7

Please sign in to comment.