[test suite] exclude /usr/include/* files from lcov coverage analysis
authorMichael Rash <mbr@cipherdyne.org>
Sun, 30 Mar 2014 20:06:46 +0000 (16:06 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sun, 30 Mar 2014 20:06:46 +0000 (16:06 -0400)
test/test-fwknop.pl

index 7945c12..0bd6235 100755 (executable)
@@ -1172,7 +1172,13 @@ sub profile_coverage() {
         &run_cmd(qq|$lcov_path --capture --directory .. | .
             qq|--output-file $output_dir/lcov_coverage.info|,
                 $cmd_out_tmp, $curr_test_file);
-        &run_cmd(qq|$genhtml_path $output_dir/lcov_coverage.info | .
+
+        ### exclude /usr/include/* files
+        &run_cmd(qq|$lcov_path -r $output_dir/lcov_coverage.info | .
+            qq|/usr/include/\* --output-file $output_dir/lcov_coverage_final.info|,
+                $cmd_out_tmp, $curr_test_file);
+
+        &run_cmd(qq|$genhtml_path $output_dir/lcov_coverage_final.info | .
             qq|--output-directory $output_dir/$lcov_results_dir|,
                 $cmd_out_tmp, $curr_test_file);
     }