summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-03-09 23:02:46 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2016-03-09 23:31:27 +0100
commit3666d14980c1059ebb25d57756bc04abef27b7d7 (patch)
treeef737073cd9b94a6946a2cac6737193add502d04 /Makefile.am
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: https://wiki.documentfoundation.org/Development/Lcov 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)
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am19
1 files changed, 13 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 9aecc454d4..8206b161b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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/coverage.info --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/coverage-baseline.info --directory $(top_builddir) --config-file .lcov-config --rc lcov_branch_coverage=1
434 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config --rc lcov_branch_coverage=1 434
435 lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config --rc lcov_branch_coverage=1 435lcov-report:
436 lcov --remove $(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file $(top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config --rc lcov_branch_coverage=1 436 lcov --capture --compat-libtool --no-external --output-file $(top_builddir)/coverage/coverage-check.info --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/coverage.cleaned3.info 437 lcov --no-external --compat-libtool --add-tracefile $(top_builddir)/coverage/coverage-baseline.info --add-tracefile $(top_builddir)/coverage/coverage-check.info --output-file $(top_builddir)/coverage/coverage.info --config-file .lcov-config --rc lcov_branch_coverage=1
438 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config --rc lcov_branch_coverage=1
439 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config --rc lcov_branch_coverage=1
440 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file $(top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config --rc lcov_branch_coverage=1
441 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/coverage.cleaned3.info '*/doc/*' --output-file $(top_builddir)/coverage/coverage.cleaned4.info --config-file .lcov-config --rc lcov_branch_coverage=1
442 lcov --no-external --compat-libtool --remove $(top_builddir)/coverage/coverage.cleaned4.info '*usr/include*' --output-file $(top_builddir)/coverage/coverage.cleaned5.info --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/coverage.cleaned5.info
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:
445if EFL_ENABLE_COVERAGE 451if EFL_ENABLE_COVERAGE
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
449if EFL_ENABLE_COVERAGE 456if EFL_ENABLE_COVERAGE