]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Command/Perl.pm
Make Test::Valgrind skip if no appropriate suppressions are available
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Command / Perl.pm
index 7e29ffe199ea62669cfd7766042efe3fa46ed60f..55c8babe5bb48e99eace1bf5148dd600cd756900 100644 (file)
@@ -186,6 +186,23 @@ sub suppressions_tag {
  return $self->{suppressions_tag};
 }
 
+sub check_suppressions_file {
+ my ($self, $file) = @_;
+
+ {
+  open my $fh, '<', $file or return 0;
+
+  local $_;
+  while (<$fh>) {
+   return 1 if /^\s*fun:Perl_/;
+  }
+
+  close $fh;
+ }
+
+ return 0;
+}
+
 sub filter {
  my ($self, $session, $report) = @_;