Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be nice to be able to run multiple test programs and get the union of the coverage. #40

Open
BengtGustafsson opened this issue Oct 27, 2020 · 1 comment

Comments

@BengtGustafsson
Copy link

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 ctetst 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.

@rawatlax
Copy link

you can do that , export the results in HTML and as well as in .cov (binary files) .
Now you can feed the previous run binary file at the start of next run to the tool and it will merge previous and this run data.
Also there is a command to merge two .cov reports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants