Closed traversaro closed 1 year ago
I never setup code coverage integration in our projects, but let's try. For example, an example codebase that integrates coverage is https://github.com/temken/template_cpp_cmake_libphysica .
Let's decompose the practice of doing coverage in some steps:
--coverage
flag, and in Debug mode (to avoid that different lines are merged together or re-ordered by the optimizers). Enabling this option ensure that whenever we run the tests, a .gcno
file is also generated, that contains information on which lines have been tested by the test (see https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Instrumentation-Options.html for more nfo)Again, I do not have a lot of experience on this, so feel free to explore yourself also in other directions.
- Then, you need someway to get the files by gcov/lcov and display them. Possible ways to do so are services like codecov (https://about.codecov.io/) or simple github actions like https://github.com/threeal/gcovr-action
For the moment we decided to use github actions like https://github.com/threeal/gcovr-action because to use other services like codecov (https://about.codecov.io/) we should configure them, but we don't have the required permissions
Ok! If you want to test any system just ask and I can add it to the repo.
If possible, we would like to try codecov. Thanks a lot!
I already completed Step 1, can you give me the mail you used to register to codecov so I can add you?
I signed up with my GitHub account, my mail is lucapastore2000@gmail.com
I can't find you, did you try to log in codecov at least once?
Yes I did
Yes I did
Ok, now I see you, you should have the access enabled.
@traversaro Do you have any advice for the coverage test? Thank you in advance!