blead segfaults on local *@; eval {1} because ERRSV assumes that
[p5sagit/p5-mst-13.2.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index 22d814d..5c6c613 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -104,7 +104,7 @@ sub _populate_hash {
 }
 
 unless (@ARGV) {
-    foreach my $dir (qw(base comp cmd run io op uni)) {
+    foreach my $dir (qw(base comp cmd run io op uni mro)) {
        _find_tests($dir);
     }
     _find_tests("lib") unless $::core;
@@ -163,6 +163,7 @@ unless (@ARGV) {
        warn "$0: cannot open $mani: $!\n";
     }
     unless ($::core) {
+       _find_tests('Module_Pluggable');
        _find_tests('pod');
        _find_tests('x2p');
        _find_tests('japh') if $::torture;
@@ -309,9 +310,11 @@ EOT
            my $redir = $^O eq 'VMS' ? '2>&1' : '';
            if ($ENV{PERL_VALGRIND}) {
                my $valgrind = $ENV{VALGRIND} // 'valgrind';
-               $perl = "$valgrind --suppressions=perl.supp --leak-check=yes "
-                               . "--leak-resolution=high --show-reachable=yes "
-                               . "--num-callers=50 --log-fd=3 $perl";
+               my $vg_opts = $ENV{VG_OPTS}
+                   //  "--suppressions=perl.supp --leak-check=yes "
+                       . "--leak-resolution=high --show-reachable=yes "
+                       . "--num-callers=50"; 
+               $perl = "$valgrind --log-fd=3 $vg_opts $perl";
                $redir = "3>$valgrind_log";
            }
            my $run = "$perl" . _quote_args("$testswitch $switch $utf8")
@@ -423,7 +426,14 @@ EOT
                    warn "$0: Failed to open '$valgrind_log': $!\n";
                }
            }
-           if (@valgrind) {
+           if ($ENV{VG_OPTS} =~ /cachegrind/) {
+               if (rename $valgrind_log, "$test.valgrind") {
+                   $valgrind++;
+               } else {
+                   warn "$0: Failed to create '$test.valgrind': $!\n";
+               }
+           }
+           elsif (@valgrind) {
                my $leaks = 0;
                my $errors = 0;
                for my $i (0..$#valgrind) {
@@ -490,7 +500,7 @@ EOT
                $good_files++;
            }
            else {
-               print "${te}skipping test on this platform\n";
+               print "${te}skipped\n";
                $tested_files -= 1;
            }
        }