Is a supported lcov port supported for windows?

I am measuring coverage for my code using the gcov library, and I would like to generate a coverage report in a user-friendly format. I found the lcov utility for this, but is not compatible with the Windows environment (mainly because of the way the paths are parsed). Does anyone know of an actively supported lcov port for Windows?

It seems that making work on Windows will be quite easy (I think it can even be solved with a few creative batch / perl scripts that mimic the behavior of unix shell commands), and this tool is quite useful, so I suppose someone might already done it.

+4
source share
4 answers

While this may be messy, lcov runs under cygwin. You may also be interested in the question How to measure the coverage of the CppUnit test (on win32 and Unix)? and his answers. Visual Studio seems to provide code coverage reports.

+2
source

The lcov genhtml port for windows is actively supported here: https://github.com/RickSBrown/jgenhtml .

It is specifically designed to run a cross platform - no backslash issues on tracks, etc.

+1
source

There is also a Windows LCOV version https://github.com/valbok/lcov with an explanation of how to use it. We had some problems using native or other versions of LCOV. For example, here http://simply-embedded.blogspot.com/2014/07/code-coverage-html-reports-using-lcov.html

Our stream looks something like this:

  • Create a project in Windows using the ARM QNX GCC compiler, compile gcno files.

  • Copy the binaries and configs to the target group under QNX and run them, collect the gcda files.

  • Run LCOV (on Windows or Linux) to create reports.

If you use your own version of LCOV, reports will be broken due to clutter of linux windows and paths and some errors inside LCOV scripts. We had to fix the scripts a bit to avoid problems like duplicates, slashes, broken paths, etc.

+1
source

There is a version of Windows made by Donald McQueen under http://www.macqueen.us/lcov.html , but I have not tested it. I made my own version, which you can find here:
http://simply-embedded.blogspot.com/2014/07/code-coverage-html-reports-using-lcov.html
This is done in version 1.11 of LCOV.

0
source

All Articles