Questions tagged [lcov]

LCOV is a graphical front-end for GCC's coverage testing tool gcov

LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement.

The homepage of the project is here.

286 questions
4
votes
1 answer

Wildcards for lcov.info path in the SonarQube scanners?

I can't seem to use wildcards to specify a path to my lcov.info file in the SonarQube MSBuild Scanner. e.g.: /d:sonar.javascript.lcov.reportPath="..\..\build\coverage\lcov\*\lcov.info" but if I specify the full path, it works:…
Rodders
  • 2,425
  • 2
  • 20
  • 34
4
votes
1 answer

ERROR while code coverage report using lcov

I am trying to run coverage on my project, after updating to Ubuntu 16.04. I get Deleted 665 files Writing data to coverage.info.cleaned lcov: ERROR: cannot write to coverage.info.cleaned! CMakeFiles/coverage.dir/build.make:57: recipe for target…
Ortal
  • 79
  • 2
  • 5
4
votes
1 answer

Autotools automatic invocation of lcov after 'make check'

I have successfully set up an autotools project where the tests compiles with instrumentation so I can get a test coverage report. I can get the report by running lcov in the source dir after a successful 'make check'. I now face the problem that I…
Alexander Torstling
  • 18,552
  • 7
  • 62
  • 74
4
votes
2 answers

How to deal with .gcda and .gcno files in different directory by lcov & code coverage compare

I can generate .info files by lcov with .gcda files and .gcno files in the same directory, BUT how can I generate code coverage with .gcda files and .gcno files in defferent location? For example,…
Yih
  • 41
  • 1
  • 1
  • 4
4
votes
1 answer

Does lcov generate intermediate .gcov files?

I use lcov with an Objective-C project and the XcodeCoverage scripts and I get a nice html report on my code coverage. However I would like to "keep" the intermediate .gcov files (if any) to feed them to another tool. Something similar to the --keep…
lazi74
  • 622
  • 1
  • 7
  • 23
4
votes
2 answers

Add *.gcno and *.gcda files to the make clean rule using CMake

I have the project with structure similar like this: ├── CMakeLists.txt ├── src │   ├── logic.cpp │   └── logic.h └── test ├── CMakeLists.txt └── logic_test.cpp The main CMakeLists.txt file is: cmake_minimum_required (VERSION 2.8) project…
Gluttton
  • 5,739
  • 3
  • 31
  • 58
4
votes
0 answers

How to run Gcov/Lcov for a diff file in the source tree?

How to use lcov --diff option to generate code coverage report for the diff of changes in a source view? I have a source view and i am able to generate lcov log file and html report for few of the modules in the source view. But, i am looking for an…
here2learn
  • 51
  • 5
4
votes
1 answer

How can I post code coverage from a combined C++/Javascript Node.js addon to Coveralls.io?

I have a Node.js module composed of both a C++ addon and Javascript library code. It includes command line generated code coverage analysis using lcov for the C++ and istanbul for the Javascript. The output from both is in lcov format which can be…
Homme Zwaagstra
  • 11,713
  • 2
  • 17
  • 14
4
votes
0 answers

LCOV code coverage - Exit status 255

When i run the code coverage to output in html, I get the error message: CalledProcessError: Command 'lcov -r mycoverage.2.temp "/../generated/*" -o mycoverage.2' returned non-zero exit status 255 The gcov -v gives: gcov (GCC) 3.4.2 I tried to find…
user1400995
4
votes
0 answers

How to use gcov with gcc without the optimization?

I have a test code like this: int diff21(int n) { if (n <= 21) { return 21 - n; } else { return (n - 21) * 2; } } and I added the compile flags: -fprofile-arcs -ftest-coverage to provide coverage data. I…
shengy
  • 9,461
  • 4
  • 37
  • 61
4
votes
1 answer

Accurate function counts with lcov and g++

I'm using Ubuntu 12, g++ and lcov, the latter installed with apt-get install lcov. I'm successfully compiling, and generating html reports with genhtml. The line coverage information looks good, but many of the function coverage counts seem odd. For…
drb
  • 45
  • 1
  • 5
3
votes
1 answer

lcov for flutter sees just part of files

I try to use lcov for flutter project in Ubuntu 20.04. Firstly i run flutter test --coverage, then genhtml coverage/lcov.info -o coverage/html. But finally only small part of files is mentioned in report. There are no entire subdirectory such as…
Valery Kulikov
  • 319
  • 1
  • 12
3
votes
1 answer

'npm run coverage' is not updating lcov.info file

I am working on an API that makes use of nyc and mocha. I noticed recently that npm run coverage no longer updates lcov.file and lcov-report folder but it updates every other file/folder in the coverage folder. I can also see that the coverage is…
Fiyin Akinsiku
  • 166
  • 2
  • 13
3
votes
1 answer

Flutter code coverage reports in VS Code on Windows?

Does anyone know a good way to see generated code coverage reports for a Flutter project in Windows, preferably using VS Code? I know I can generate coverage reports using flutter test --coverage which generates a coverage file…
mikeesouth
  • 1,610
  • 1
  • 19
  • 34
3
votes
3 answers

Run genhtml in WSL

I've been trying to use WSL to generate html reports for the code coverage of my flutter project, but this happens when I run genhtml coverage/lcov.info -o coverage/html: Reading data file coverage/lcov.info Resolved relative source file path…
kermite
  • 31
  • 2