]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Parser/Suppressions/Text.pm
Always strip wildcard frames at the end of a suppression
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Parser / Suppressions / Text.pm
index 7a91d5fa80411d691845beef0abdb2a04eef7fa2..6eb2dfcf54b2e44da1b537066bfa64e78a478e2b 100644 (file)
@@ -9,11 +9,11 @@ Test::Valgrind::Parser::Suppressions::Text - Parse valgrind suppressions output
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -21,6 +21,8 @@ This is a L<Test::Valgrind::Parser::Text> object that can extract suppressions f
 
 =cut
 
+use Test::Valgrind::Suppressions;
+
 use base qw/Test::Valgrind::Parser::Text Test::Valgrind::Carp/;
 
 =head1 METHODS
@@ -54,13 +56,7 @@ sub parse {
   if ($_ eq '{') {      # A suppression block begins
    $in = 1;
   } elsif ($_ eq '}') { # A suppression block ends
-   # With valgrind 3.4.0, we can replace unknown series of frames by '...'
-   if ($sess->version ge '3.4.0') {
-    my $unknown_tail;
-    ++$unknown_tail while $s =~ s/(\n)\s*obj:\*\s*$/$1/;
-    $s .= "...\n" if $unknown_tail;
-   }
-
+   $s = Test::Valgrind::Suppressions->strip_tail($sess, $s); # Strip the tail
    push @supps, $s;     # Add the suppression that just ended to the list
    $s  = '';            # Reset the state
    $in = 0;