gcov the derived .c file as well as the .xs or .im file
authorTony Cook <tony@develop-help.com>
Fri, 24 May 2013 13:12:49 +0000 (23:12 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 24 May 2013 13:12:49 +0000 (23:12 +1000)
imcover.perl

index 6a05efb..5c75c43 100644 (file)
@@ -52,6 +52,14 @@ for my $filename (keys %$mani) {
   else {
     push @{$paths{''}}, $filename;
   }
+  if ($filename =~ s/\.(xs|im)$/.c/) {
+    if ($filename =~ m!^(\w+)/(\w+\.\w+)$!) {
+      push @{$paths{$1}}, $2;
+    }
+    else {
+      push @{$paths{''}}, $filename;
+    }
+  }
 }
 
 for my $path (keys %paths) {