diff options
authorStefan Schmidt <>2016-03-09 23:02:46 +0100
committerStefan Schmidt <>2016-03-09 23:31:27 +0100
commit3666d14980c1059ebb25d57756bc04abef27b7d7 (patch)
parentb0c28953b327b4dd96570d6abd8d64ca939c8c32 (diff)
build coverage: make coverage numbers more accurate by using a baseline
The lcov tool offers the functionality to have an initial run over the code base before the tests are executed to make sure it catches all files, even the ones that are not loaded during the test run. This is something we missed so far. The reports have only been in relation to the files that actually have been loaded during the test. We missed quite a few files which made our numbers inaccurate. Things like modules/emotion/gstreamer1 have no tests yet and thus never showed up in the coverage report. While it has 103 functions and over thousand lines which need to get covered. With the baseline this is handled now. Thanks goes to the folks at LibreOffice who described their lcov setup here: New numbers are lower now as we count in all the files never loaded which decreases our percentages. Overall coverage rate: lines......: 30.2% (65119 of 215841 lines) functions..: 34.0% (6361 of 18733 functions) branches...: 23.6% (35627 of 151096 branches)
1 files changed, 13 insertions, 6 deletions
diff --git a/ b/
index 9aecc454d4..8206b161b8 100644
--- a/
+++ b/
@@ -428,13 +428,19 @@ lcov-reset:
428 @find $(top_builddir) -name "*.gcda" -delete 428 @find $(top_builddir) -name "*.gcda" -delete
429 @lcov --zerocounters --directory $(top_builddir) 429 @lcov --zerocounters --directory $(top_builddir)
430 430
431lcov-report: 431lcov-baseline:
432 $(MKDIR_P) $(top_builddir)/coverage 432 $(MKDIR_P) $(top_builddir)/coverage
433 lcov --capture --compat-libtool --no-external --output-file $(top_builddir)/coverage/ --directory $(top_builddir) --config-file .lcov-config --rc lcov_branch_coverage=1 433 lcov --capture --initial --compat-libtool --no-external --output-file $(top_builddir)/coverage/ --directory $(top_builddir) --config-file .lcov-config --rc lcov_branch_coverage=1
434 lcov --remove $(top_builddir)/coverage/ '*.h' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1 434
435 lcov --remove $(top_builddir)/coverage/ '*/tests/*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1 435lcov-report:
436 lcov --remove $(top_builddir)/coverage/ '*NONE*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1 436 lcov --capture --compat-libtool --no-external --output-file $(top_builddir)/coverage/ --directory $(top_builddir) --config-file .lcov-config --rc lcov_branch_coverage=1
437 genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/ 437 lcov --no-external --compat-libtool --add-tracefile $(top_builddir)/coverage/ --add-tracefile $(top_builddir)/coverage/ --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
438 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/ '*.h' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
439 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/ '*/tests/*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
440 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/ '*NONE*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
441 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/ '*/doc/*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
442 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/ '*usr/include*' --output-file $(top_builddir)/coverage/ --config-file .lcov-config --rc lcov_branch_coverage=1
443 genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/
438 @echo "Coverage Report at $(top_builddir)/coverage/html" 444 @echo "Coverage Report at $(top_builddir)/coverage/html"
439 445
440endif 446endif
@@ -444,6 +450,7 @@ if EFL_ENABLE_TESTS
444lcov-check: 450lcov-check:
446 @$(MAKE) $(AM_MAKEFLAGS) lcov-reset 452 @$(MAKE) $(AM_MAKEFLAGS) lcov-reset
453 @$(MAKE) $(AM_MAKEFLAGS) lcov-baseline
447endif 454endif
448 @$(MAKE) $(AM_MAKEFLAGS) check 455 @$(MAKE) $(AM_MAKEFLAGS) check