X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FCommand%2FPerl.pm;h=2a8e2a41286eaa54002c4d33b0342bb00a3fbd69;hb=b850006da6188f2d453accc63174fe3a431bf0ed;hp=3ded74a587c7ebbbb2f3cf61a4200a3a72b1b493;hpb=11eeabaad0bbb6db15b9c967fae94cd7388f0012;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Command/Perl.pm b/lib/Test/Valgrind/Command/Perl.pm index 3ded74a..2a8e2a4 100644 --- a/lib/Test/Valgrind/Command/Perl.pm +++ b/lib/Test/Valgrind/Command/Perl.pm @@ -9,14 +9,17 @@ Test::Valgrind::Command::Perl - A Test::Valgrind command that invokes perl. =head1 VERSION -Version 1.01 +Version 1.11 =cut -our $VERSION = '1.01'; +our $VERSION = '1.11'; =head1 DESCRIPTION +This command is the base for all C-based commands. +It handles the suppression generation and sets the main command-line flags. + =cut use Env::Sanctify (); @@ -142,7 +145,7 @@ Returns an L object that sets the environment variables Csanctify( env => { - PERL_DESTRUCT_LEVEL => 2, + PERL_DESTRUCT_LEVEL => 3, PERL_DL_NONLAZY => 1, }, ); @@ -166,6 +169,22 @@ sub suppressions_tag { return $self->{suppressions_tag}; } +sub filter { + my ($self, $session, $report) = @_; + + return $report if $report->is_diag + or not $report->isa('Test::Valgrind::Report::Suppressions'); + + my $data = $report->data; + $data =~ s/^[^\r\n]*\bPerl_runops_(?:standard|debug)\b.*//ms; + + $report->new( + id => $report->id, + kind => $report->kind, + data => $data, + ); +} + sub DESTROY { my ($self) = @_;