-
Notifications
You must be signed in to change notification settings - Fork 287
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
CMake: add targets to generate local coverage reports #1068
Comments
Hello, |
Great @emye . Let me know if you need any help about this topic. |
If you have some add hoc questions, you can also drop by in the |
Do you use ctest? Because it has coverage support. See |
@cryptomilk at the end @emye implemented it in a custom way. In case we start using CTest more intensively in the future we can check if the CTest/CMake support can simplify things. At the moment, since we have a mix of Unit Tests (included in CTest), bash & python tests (Not included in CTest), I think the current implementation is good enough. |
I think we have to "let this go". I'll associate this issue with #1550 for investigation. I don't know anything about CTest. Perhaps @1div0 can look at CTest and make a recommendation if this should be adopted. Now that the test suite is totally implemented in python3, I don't perceive that Exiv2 needs CTest. |
Let's close this one. In #1073 we already added something to generate local coverage reports in CTest is just the CMake test driver program. A helper to run your project tests easily with that CMake tool. As you mentioned Exiv2 probably does not need CTest, but it could make the life easier for newcomers to the project with previous experience in the tool. If we can run the tests easily with CTest I would vote for improving the support, but anyways it is a different topic to the "coverage" one which is the main topic discussed in this issue. |
Good. Everything we have in CMake for build, test, documentation, and release bundles is working well. If a contributor says "I know how to make this better with CTest", he/she can do the work. I'll let Peter know to forget about CTest. |
@clanmills I am OK with that. |
Although we already have an option in CMake which add the needed compiler flags in GCC and CLANG to produce coverage information (this is used by the tools we employ in the PRs to generate coverage reports) it would be nice to also add some targets in the CMake configuration to generate local coverage reports.
This would be useful for exploring not exercised paths in the code while testing either some legacy code or new features.
Some ideas of how this could be achieved can be found on the web:
https://codeist.zone/2018/03/16/code-coverage-with-gcov-and-cmake/
http://www.stablecoder.ca/2018/01/15/code-coverage.html
The text was updated successfully, but these errors were encountered: