From 9c04f2f1f997535bd98eb5527c6ba3a74af5ac7e Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 13 Sep 2016 10:16:41 -0700 Subject: [PATCH] lcov: ignore external files in coverage data Rather than removing external coverage data at the end, just don't capture it at all. Change-Id: I23b74a4aa735e470b642af76040d1c3ed491276f Signed-off-by: Daniel Verkamp --- autotest.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autotest.sh b/autotest.sh index 6e0c6f594..bebbe9128 100755 --- a/autotest.sh +++ b/autotest.sh @@ -33,7 +33,7 @@ if hash lcov; then --rc genhtml_legend=1 --rc geninfo_all_blocks=1 " - export LCOV="lcov $LCOV_OPTS" + export LCOV="lcov $LCOV_OPTS --no-external" export GENHTML="genhtml $LCOV_OPTS" # zero out coverage data $LCOV -q -c -i -t "Baseline" -d $src -o cov_base.info @@ -126,7 +126,6 @@ if hash lcov; then # generate coverage data and combine with baseline $LCOV -q -c -d $src -t "$(hostname)" -o cov_test.info $LCOV -q -a cov_base.info -a cov_test.info -o cov_total.info - $LCOV -q -r cov_total.info '/usr/*' -o cov_total.info $LCOV -q -r cov_total.info 'test/*' -o cov_total.info $GENHTML cov_total.info -t "$(hostname)" -o $out/coverage chmod -R a+rX $out/coverage