generating branch coverage data for lcov

后端 未结 4 595
旧巷少年郎
旧巷少年郎 2021-02-02 11:44

i\'m trying to use lcov for code coverage metrics, but I cannot get branches coverage to work.

Here\'s how i\'m using it:

g++ -ggdb3 --coverage src/read.         


        
4条回答
  •  庸人自扰
    2021-02-02 12:11

    The latest version of LCOV disabled branch coverage by default.

    You need to re-enable it by either:

    • editing your ~/.lcovrc file (copied from /etc/lcovrc) to change lcov_branch_coverage setting to 1
    • adding --rc lcov_branch_coverage=1 to your lcov command lines

提交回复
热议问题