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

CTest coverage reporting #613

Open
jhenin opened this issue Oct 24, 2023 · 1 comment
Open

CTest coverage reporting #613

jhenin opened this issue Oct 24, 2023 · 1 comment

Comments

@jhenin
Copy link
Member

jhenin commented Oct 24, 2023

I am trying to get CTest coverage reporting to work for our unit/functional tests, but no success so far.
I've had to add include(CTest) to the make CMakeLists.txt.

Then enabling the coverage option, building using cmake, and running
ctest -T test -T coverage
does give a report, but not a very informative one:

        Covered LOC:         0
        Not covered LOC:     0
        Total LOC:           0
        Percentage Coverage: 0.00%

I'm missing something here. Any idea?

@giacomofiorin
Copy link
Member

#608 disabled coverage by default. Did you re-enable it via variable?

Other than that I have not tried previously using CTest for this, I only ran gcov manually, seeing that coverage was at reasonably high values in most files.

To be more useful than that, one would want to display which sections are covered. The LAMMPS repo seems to have a nice toolchain set up, but I have not tried using it yet.

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