More PERL_POISON - poison SvANY() and SvREFCNT() in freed SV heads.
[p5sagit/p5-mst-13.2.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index e4aa49b..59c8fa5 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -69,7 +69,7 @@ $ENV{EMXSHELL} = 'sh';        # For OS/2
 # Roll your own File::Find!
 use TestInit;
 use File::Spec;
-use Time::HiRes;
+if ($show_elapsed_time) { require Time::HiRes }
 my $curdir = File::Spec->curdir;
 my $updir  = File::Spec->updir;
 
@@ -263,7 +263,7 @@ EOT
     my $totmax = 0;
 
     while (my $test = shift @tests) {
-        my $test_start_time = Time::HiRes::time();
+        my $test_start_time = $show_elapsed_time ? Time::HiRes::time() : 0;
 
        if ( $::infinite{$test} && $type eq 'compile' ) {
            print STDERR "$test creates infinite loop! Skipping.\n";
@@ -364,9 +364,10 @@ EOT
            my $perl = $ENV{PERL} || './perl';
            my $redir = $^O eq 'VMS' ? '2>&1' : '';
            if ($ENV{PERL_VALGRIND}) {
-               $perl = "valgrind --suppressions=perl.supp --leak-check=yes "
-                              . "--leak-resolution=high --show-reachable=yes "
-                              . "--num-callers=50 --logfile-fd=3 $perl";
+               my $valgrind = $ENV{VALGRIND} // 'valgrind';
+               $perl = "$valgrind --suppressions=perl.supp --leak-check=yes "
+                               . "--leak-resolution=high --show-reachable=yes "
+                               . "--num-callers=50 --logfile-fd=3 $perl";
                $redir = "3>$valgrind_log";
            }
            my $run = "$perl" . _quote_args("$testswitch $switch $utf8")