0

I am trying to generate code coverage data from gcda using lcov.Following is the command I am using:

lcov -c --rc lcov_branch_coverage=1 -d /path -o try_main.info But this is not dumping any data.

Following is the process seen:

/usr/bin/perl -w /usr/bin/geninfo /path --output-filename try_main.info --rc lcov_branch_coverage=1

But info file does not contain any data. When I use gcov for branch data it dumps data very soon.Is lcov slow or any issue with my command?Any pre-requisite while compiling code for gcov branch coverage?

My LCOV version is:

lcov: LCOV version 1.10

Suzanno Hogwarts
  • 323
  • 2
  • 3
  • 12
  • Try posting the console output of the lcov command. You can also try out the latest code from their github page. – AmeyaVS May 10 '17 at 03:02
  • Its not displaying any output it keeps running as shown by the process. – Suzanno Hogwarts May 12 '17 at 04:07
  • Have you compiled the code with --coverage compiler and the linker flag? Can you just try the gcov command with the generated *.gcno/*.gcda files and see if the gcov is working fine. For reference you can look [here](https://embeddedinn.wordpress.com/tutorials/test-coverage-analysis-with-gcov/) for more information. – AmeyaVS May 12 '17 at 05:26
  • With gcov its working fine its dumping branch data but when i use lcov command its not. – Suzanno Hogwarts May 12 '17 at 08:16
  • Can you try out the latest release from **lcov** github project page: [https://github.com/linux-test-project/lcov](https://github.com/linux-test-project/lcov)? – AmeyaVS May 12 '17 at 10:07
  • With the latest release of lcov the default branch coverage is not included in the coverage report. You can try these with lcov to dump branch coverage report: $ lcov -rc lcov_branch_coverage=1 ... or edit the ~/.lcovrc file containing: # enable lcov branch report lcov_branch_coverage = 1 # enable genhtml branch report genhtml_branch_coverage = 1 – AmeyaVS May 24 '17 at 03:20

0 Answers0