stefan pushed a commit to branch master.

commit 0dca76798ef83672f3c1f90ed024de55086d346e
Author: Stefan Schmidt <>
Date:   Fri Mar 4 12:25:19 2016 +0100

    build: finally enable branch coverage in our lcov-check target
    This has been a long standing issue and I finally figured out the details to
    get this working. Since we started with coverage there always have been some
    problems to get branch coverage work (problems with older gcc versions, lcov
    not taking them into account, etc)
    The last detail that made me go nuts was that in my lcov version (1.10) 
    is a bug which leads to geninfo not applying the config file and thus not
    enabling the branch coverage like I defined in the config. I added the
    --rc option to work around this case.
    In my local run I get this now from lcov-check:
    Overall coverage rate:
      lines......: 35.5% (65814 of 185169 lines)
      functions..: 44.6% (7661 of 17195 functions)
      branches...: 22.7% (31492 of 138942 branches)
    So we have 22.7% branch coverage right now.
    The vivid followers of my QA mails will also see the difference in numbers 
    line and function coverage if one comapres my local results and the one on
    Jenkins. This is another long standing issue and I need to figure out these
    details next. :)
 .lcov-config |  4 +++-  | 10 +++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.lcov-config b/.lcov-config
index bb631ac..ef201f5 100644
--- a/.lcov-config
+++ b/.lcov-config
@@ -1 +1,3 @@
-geninfo_auto_base = 1
diff --git a/ b/
index 08d8701..9aecc45 100644
--- a/
+++ b/
@@ -430,11 +430,11 @@ lcov-reset:
        $(MKDIR_P) $(top_builddir)/coverage
-       lcov --capture --compat-libtool --no-external --config-file 
.lcov-config --output-file $(top_builddir)/coverage/ --directory 
-       lcov --remove $(top_builddir)/coverage/ '*.h' 
--output-file $(top_builddir)/coverage/
-       lcov --remove $(top_builddir)/coverage/ 
'*/tests/*' --output-file $(top_builddir)/coverage/
-       lcov --remove $(top_builddir)/coverage/ '*NONE*' 
--output-file $(top_builddir)/coverage/
-       genhtml --legend -t "$(PACKAGE_STRING)" -o 
$(top_builddir)/coverage/html $(top_builddir)/coverage/
+       lcov --capture --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/ --directory $(top_builddir) 
--config-file .lcov-config --rc lcov_branch_coverage=1
+       lcov --remove $(top_builddir)/coverage/ '*.h' 
--output-file $(top_builddir)/coverage/ --config-file 
.lcov-config --rc lcov_branch_coverage=1
+       lcov --remove $(top_builddir)/coverage/ 
'*/tests/*' --output-file $(top_builddir)/coverage/ 
--config-file .lcov-config --rc lcov_branch_coverage=1
+       lcov --remove $(top_builddir)/coverage/ '*NONE*' 
--output-file $(top_builddir)/coverage/ --config-file 
.lcov-config --rc lcov_branch_coverage=1
+       genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o 
$(top_builddir)/coverage/html $(top_builddir)/coverage/
        @echo "Coverage Report at $(top_builddir)/coverage/html"


Reply via email to