-
Hey everyone, I am using windows, where lcov is not available,, is there a way to still use the integration? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
@makas005 Thanks for the question, tagging @TSonono who contributed that feature. It seems like based on your testing we may need to fill a gap to support this for you, but I'll let @TSonono fill any knowledge gaps here. |
Beta Was this translation helpful? Give feedback.
-
Hello @makas005 and @gcampbell-msft , Yes indeed the test coverage integration in CMake Tools currently only supports lcov based coverage data. The reason I only added support for that in the implementation I did, is that it's the only coverage data format that I'm familiar with myself. As specified in the #4094, I think adding support for additional coverage data formats would be a good thing. Very small adjustments would have to be done to the current implementation (in addition to the work of actually parsing different coverage data types) for this to be possible. However, I can't comment the extent of the parsing work, since I'm not familiar with (what I assume you are using) MSVC's coverage data format. It might perhaps be proprietary, which would make it more difficult if there are no existing parsers for it written in typescript/javascript (as was the case with lcov).
Assuming you are using a compilation toolchain (that is not MSVC) that supports gcov output (such as
|
Beta Was this translation helpful? Give feedback.
-
Sorry guys, I was busy at work and then I missed/forgot about this. This is a bug that I'll fix in the extension. It turns out the lcov parser that we use returns a "carriage return" in the path when the lcov info file contains windows paths, which confuses vscode when we add coverage data that contains that path. I'll have a fix up imminently. |
Beta Was this translation helpful? Give feedback.
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.
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-…