From bfb4892ac709766cac5b0a115d96c5a7baa67706 Mon Sep 17 00:00:00 2001 From: Michal Bloch Date: Wed, 28 Nov 2018 21:16:34 +0100 Subject: [PATCH] tests: don't report coverage of tests themselves 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 --- src/tests/lcov.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/lcov.sh b/src/tests/lcov.sh index fbec144..6a1f4de 100755 --- a/src/tests/lcov.sh +++ b/src/tests/lcov.sh @@ -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 -- 2.7.4