In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e07ce2e4e82e3054dc912dbe99348744647bf30b?hp=9e2bec029fb0c747ff8d682f110159537237714b>

- Log -----------------------------------------------------------------
commit e07ce2e4e82e3054dc912dbe99348744647bf30b
Author: George Greer <[email protected]>
Date:   Fri Jul 2 18:50:12 2010 -0400

    Adjust 'make test.valgrind' to account for cpan/dist/ext separation.
    
    Signed-off-by: H.Merijn Brand <[email protected]>
-----------------------------------------------------------------------

Summary of changes:
 t/TEST    |   11 ++++++++---
 t/test.pl |    3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/t/TEST b/t/TEST
index 205a8aa..d4bf64c 100755
--- a/t/TEST
+++ b/t/TEST
@@ -91,7 +91,7 @@ if ($::do_nothing) {
 }
 
 # Location to put the Valgrind log.
-my $Valgrind_Log = 'current.valgrind';
+our $Valgrind_Log;
 
 $| = 1;
 
@@ -296,13 +296,17 @@ sub _cmd {
         my $redir = $^O eq 'VMS' ? '2>&1' : '';
 
         if ($ENV{PERL_VALGRIND}) {
+            my $perl_supp = $options->{return_dir} ? 
"$options->{return_dir}/perl.supp" : "perl.supp";
             my $valgrind = $ENV{VALGRIND} // 'valgrind';
             my $vg_opts = $ENV{VG_OPTS}
-              //  "--suppressions=perl.supp --leak-check=yes "
+              //  "--suppressions=$perl_supp --leak-check=yes "
                 . "--leak-resolution=high --show-reachable=yes "
-                  . "--num-callers=50";
+                  . "--num-callers=50 --track-origins=yes";
             $perl = "$valgrind --log-fd=3 $vg_opts $perl";
             $redir = "3>$Valgrind_Log";
+            if ($options->{run_dir}) {
+                $Valgrind_Log = "$options->{run_dir}/$Valgrind_Log";
+            }
         }
 
         my $args = "$options->{testswitch} $options->{switch} 
$options->{utf8}";
@@ -549,6 +553,7 @@ EOT
            $te = '';
        }
 
+        (local $Valgrind_Log = "$test.valgrind-current") =~ s/^.*\///;
        my $results = _run_test($test, $type);
 
        my $failure;
diff --git a/t/test.pl b/t/test.pl
index 88e52ee..6109d8e 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -814,6 +814,9 @@ sub watchdog ($)
     my $timeout = shift;
     my $timeout_msg = 'Test process timed out - terminating';
 
+    # Valgrind slows perl way down so give it more time before dying.
+    $timeout *= 10 if $ENV{PERL_VALGRIND};
+
     my $pid_to_kill = $$;   # PID for this process
 
     # Don't use a watchdog process if 'threads' is loaded -

--
Perl5 Master Repository

Reply via email to