Skip to content

Using OpenCppCoverage

Krzysztof Kowalczyk edited this page Sep 19, 2015 · 5 revisions

I tried OpenCppCoverage 0.9.2.1 on SumatraPDF.

It did work, although wasn't perfect.

I installed 64-bit version from the installer. I ran OpenCppCoverage.exe --sources . -- .\dbg64\SumatraPDF.exe, opened a file, closed the program.

It generated CoverageReport-${date} directory with HTML report. I think it was supposed to generate index.html file with summary of results but it didn't. It only generated Modules\SumatraPDF\${module}.html files for each source file. Without summary it's cumbersome to inspect the results.

I've opened a bug for OpenCppCoverage to investigate: https://opencppcoverage.codeplex.com/workitem/7

They recommend running on debug code.

At the end it reports generating reports for system dlls, but also says can't get symbols, so it doesn't actually generate anything.

Another option would be to use --export_type=binary option which generates SumatraPDF.cov file and write html generator myself. I assume the format of .cov file is simple.

Clone this wiki locally