OpenCppCoverage/OpenCppCoveragePlugin

Plugin doesn't work for static libraries

samnaction opened this issue · 2 comments

I have a static library and I have written a google test for one of the files in the static library. When I run through the visual studio plugin(0.9.6.1), I am unable to get coverage. If I run through the OpenCppCoverage command line its creating coverage report. I tried checking "Cover children processes" but it doesnt work. The plugin works fine for tests written for dlls.

Hello,

I have just created a default C++ console application that call a function inside a static library. The coverage of the static library is correct.

In the plugin settings, there is a tab named Command line. You can run this command from cmd.exe and see Coverage report is empty.

You can also create a small project that reproduce the issue and post it so I can investigate the problem.

I hope it helps,

OpenCppCoverage

I noted that you have to check the test exe in addition to the tested library project to actually get any output. Not perfect, but not a big deal if you know about it.