X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FSuppressions.pm;h=3af3a9847631fb3025c7857709b2f4a0ff77287e;hb=07e9c71f216de121217542e294a3f4a2a2896919;hp=8c34812da34df845aaaf679f7691d355aded32c7;hpb=abe419ac02d109283a1fe5615f5ab9d0a9a5572f;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Suppressions.pm b/lib/Test/Valgrind/Suppressions.pm index 8c34812..3af3a98 100644 --- a/lib/Test/Valgrind/Suppressions.pm +++ b/lib/Test/Valgrind/Suppressions.pm @@ -9,11 +9,11 @@ Test::Valgrind::Suppressions - Generate suppressions for given tool and command. =head1 VERSION -Version 1.01 +Version 1.11 =cut -our $VERSION = '1.01'; +our $VERSION = '1.11'; =head1 DESCRIPTION @@ -88,6 +88,29 @@ sub generate { return $status; } +=head2 C + +Removes all wildcard frames at the end of the suppression. +Moreover, C<'...'> is appended when C C<3.4.0> or higher is used. +Returns the mangled suppression. + +=cut + +sub strip_tail { + shift; + + my ($sess, $supp) = @_; + + 1 while $supp =~ s/[^\r\n]*:\s*\*\s*$//; + # With valgrind 3.4.0, we can replace unknown series of frames by '...' + if ($sess->version ge '3.4.0') { + 1 while $supp =~ s/[^\r\n]*\.{3}\s*$//; + $supp .= "...\n"; + } + + $supp; +} + =head1 SEE ALSO L, L, L, L.