Skip to content

CTest with test coverage only possible with lcov? #4302

Closed Answered by TSonono
makas005 asked this question in Q&A
Discussion options

You must be logged in to vote

so directly using the .gcno and .gcda would have been nice.

I agree that this could have been nice. The problem with this approach is that there are no good node libraries for parsing gcov files. On the other hand, as of gcc14+, gcov (14+) can now output a report in json. But gcc 14 is the latest stable version of gcc, and it would be unfortunate to only support setups with the latest version of gcc.

Using the windows port of lcov also comes with problems, but this might the most promising solution at the moment. Thank you!

You could also use gcovr, a python pip module which can easily be installed and convert gcda/gcno files to an lcov report:

python3 -m venv gcovr-venv
source grovr-…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@makas005
Comment options

@TSonono
Comment options

Answer selected by makas005
@makas005
Comment options

@gcampbell-msft
Comment options

Comment options

You must be logged in to vote
2 replies
@TSonono
Comment options

@gcampbell-msft
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants