OpenCppCoveragePlugin icon indicating copy to clipboard operation
OpenCppCoveragePlugin copied to clipboard

Plugin doesn't work for static libraries

Open samnaction opened this issue 6 years ago • 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.

samnaction avatar Oct 15 '19 06:10 samnaction

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

OpenCppCoverage avatar Dec 01 '19 09:12 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.

BengtGustafsson avatar Oct 27 '20 17:10 BengtGustafsson