Show the code coverage in make test-binary output.#594
Conversation
|
Ephemeral COPR build failed. @containers/packit-build please check. |
|
Output is visible at the end of https://cirrus-ci.com/task/6362001716281344. |
|
@jankaluza Can we use just normal Something like this? |
|
Separate test-coverage target is probably good idea. For the plain The .gcov file-format is quite complex when it comes to uncovered lines. We could do some approximation of what gcovr is doing with: But it does not handle some of the .gcov file-format features which are not trivial to handle without more complex code. I think |
648fb6f to
4dda1b6
Compare
|
@jnovy , there's a dedicated I believe the cri-o oldstable failure is not related? I will check it more to be sure. |
This commit adds the `make test-coverage` to recompile the conmon with `--coverage` flag so it generates the `.gcno and `.gcda` (these files are included in the `.gitignore` now) while running the tests. After that, the `gcovr` is executed to show the code coverage based on those files. If `gcovr` is not found, it fallbacks to `gcov`. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
|
LGTM now, thanks. |
This commit changes the
make test-binaryto recompile the conmon with--coverageflag so it generates the.gcno and.gcda(these files are included in the.gitignore` now) while running the tests.After that, the
gcovris executed to show the code coverage based on those files.