avoid trying to gcov unincluded files
authorTony Cook <tony@develop-help.com>
Thu, 25 Oct 2012 03:42:59 +0000 (14:42 +1100)
committerTony Cook <tony@develop-help.com>
Sat, 24 Nov 2012 04:05:55 +0000 (15:05 +1100)
some C files included with Imager are not included in every build
avoid the noise of trying to gcov them when they aren't

imcover.perl

index f55c98dfc67f9268763b189e041c7a99f0478773..253122a3e7acdaef43809e48cd51c0d35d68e984 100644 (file)
@@ -41,6 +41,8 @@ my $mani = maniread();
 my %paths;
 for my $filename (keys %$mani) {
   next unless $filename =~ /\.(xs|c|im)$/;
+  (my $gcda = $filename) =~ s/\.\w+$/.gcda/;
+  next unless -f $gcda;
   if ($filename =~ m!^(\w+)/(\w+\.\w+)$!) {
     push @{$paths{$1}}, $2;
   }