0

I want to generate HTML reports of result of coverage information of code written c++. what is the command to generate it ? I was using File 'c:/mingw/lib/gcc/mingw32/6.3.0/include/c++/iostream' Lines executed:100.00% of 1 Creating 'iostream.gcov'

Lines executed:100.00% of 5

But i was unable to open .gcov file

Is Lcov related to genearting html reports?

1 Answers1

2

If you have both .gcno and .gcda files available you can use geninfo to generate HTML reports.

First we will generate a .info file which will help us generating the html view for our coverage reports. To generate the .info file we use:

geninfo "path for .gcda files" -b "path for the source files" -o ./coverage1.info

The -b option is for setting the base directory for geninfo to search for source files.

This will generate coverage1.info which can be used to generate a html based coverage report. To generate the html report we use:

genhtml coverage1.info -o temp
VVish
  • 251
  • 4
  • 11