OpenCppCoverage/OpenCppCoveragePlugin

Checkbox to group test programs to run and get coverage results merged

BengtGustafsson opened this issue · 1 comments

We have about 25 separate unit test programs. To get coverage we have to run them all. This gets really cumbersome with or without the VS plugin. I would like another column in the setup (under tools maybe) where you can check which projects are unit tests and then merge the results of running all of them automatically.

We use ctest to run all exes that are flagged in the cmakelists files as test programs. It would be super to be able to run coverage on the RUN_TESTS project to get coverage over runs of all tests. This basically requires running ctest as the executable with the "cover child processes" enabled. The problem is that ctest normally runs when you "build" the RUN_TESTS target, not when you "run" it, so some extra work is required to make this work.

I made a makeshift solution where an extra project contains a small exe that just does system() on all our unit tests which works but of course needs extra attention whenever we add another program etc. runinng this with "cover child processes" enabled work fine.

Sorry, duplicate.