0

I am able to compile code properly with --coverage, but there is some file which is included in other file like below (format of file is same but name changed for privacy):

file a.c :

#include l.c

#include m.c

make.depend:

a.o : l.c

==================

  1. Here i am able to get a.gcno not l.gcno.
  2. After doing some testcases, able to l.gcda but not a.gcda (this looks strange to me).
  3. Now after running lcov (lcov -c -d . --gcov-tool /usr/bin/i686-pc-linux-gnu-gcov --output-file test.info) and genhtml (genhtml -o report_dir -t report_name --num-spaces 4 your_project.info --ignore-errors source) got l.c.gcov.html but here lines got executed and it is showing 0 times line coverd.

Please help me to understand and resolve this issue.

Thanks!

Shivam
  • 211
  • 1
  • 13

0 Answers0