tests: don't report coverage of tests themselves 71/194071/3
authorMichal Bloch <m.bloch@samsung.com>
Wed, 28 Nov 2018 20:16:34 +0000 (21:16 +0100)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 30 Nov 2018 00:31:01 +0000 (00:31 +0000)
Counting test cases themselves in the report just inflates the coverage
since they tend to have a lot of lines that are executed unconditionally.

Change-Id: I74f961fb8432bbfef06fa522e06aad650ad94a6c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/tests/lcov.sh

index fbec144..6a1f4de 100755 (executable)
@@ -4,8 +4,9 @@ lcov -c -o raw_lcov_trace --directory .
 
 # gcov generates data for /usr/include/ but lcov can't find their sources.
 # This also removes clutter from dlog's own include dir (just thin wrappers).
+# Tests themselves are also removed because their coverage is not meaningful.
 # Ideally this would be done in the -c step above but I couldn't figure out how to.
-lcov --remove raw_lcov_trace '*/include/*' -o filtered_lcov_trace
+lcov --remove raw_lcov_trace '*/include/*' '*/src/tests/*' -o filtered_lcov_trace
 
 # Seek the results in index.html in dlog's build dir
 genhtml filtered_lcov_trace