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
2
votes
1 answer

xcode7 code coverage with getcov and lcov

With the latest Xcode we can now view code coverage of local builds or integrations. I want to export the coverage results to build some analysis of this data. The project https://github.com/jonreid/XcodeCoverage seems like a simple way to export…
Seamus
  • 1,107
  • 10
  • 22
2
votes
1 answer

How to exclude a particular file when converting js coverage lcov file to cobertura XML

I am using python script to convert lcov file to cobertura format so that I can use Jenkins plugin to show the report in the job. I need to exclude few packages and some files, the python script only provides option to exclude packages. Any other…
QE Expert
  • 71
  • 1
  • 2
2
votes
1 answer

(Node) JS Utility function to convert lcov file to cobertura XML

I am using Blanket.JS for code coverage and unfortunately it supports generating only lcov strings other than JSON and HTML. But I would like Jenkins to consume the same report but it seems it supports Cobertura. I am looking for ways to convert…
UndefinedN
  • 23
  • 4
2
votes
2 answers

lcov or gcov -- how to large project analyze

I have large project to analyse. How to use gcov or lcov for it. I found plenty of document for gcov for a single C file. Not much document about lcov too. I'll be thankful for any pointers or tips or links
webminal.org
  • 44,948
  • 37
  • 94
  • 125
2
votes
0 answers

LCOV code coverage help- compare from previous runs

Is there any way to improve code coverage using lcov or gcov , Like I want to compare code coverage from previous runs? It is useless to run code coverage for whole codings.I want code coverage for only specific files which is modified.
Anurag Kumar
  • 39
  • 1
  • 5
2
votes
2 answers

Unable to merge coverage data using genhtml

I'm using genhtml (in Windows under cygwin) to generate a unit test coverage report from 2 coverage data files. They are all coverage data from the same unit test source file. However, when I entered the following command: perl genhtml…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
2
votes
1 answer

IOS project code coverage source file is relative path

I have generated .gcno and .gcda files after running my iphone app.Then I use cover story to view the coverage rate.However, cover story could not open the source file and I found that the source path is a relative path, not full path.All I can see…
2
votes
2 answers

Running genhtml using cygwin Perl.exe in Windows

I'm trying to run genhtml using perl.exe from Cygwin in Windows. I have installed cygwin and placed genhtml in the bin directory of cygwin. I went to that directory and used the command line in Windows: perl genhtml abc.dat where abc.dat is the…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
2
votes
2 answers

LCov option processing for removing multiple patterns

I need to create a set of regex patterns to be used within the --remove option of the lcov command, in order to remove some pointless entries in the coverage file. Reading the manpage of lcov it seems the list of patterns shall be handed to it as a…
Blazor
  • 171
  • 4
  • 11
2
votes
2 answers

Viewing LCOV file in Windows

Background: I have used JsTestDriverCoverage and generated a test coverage report for my Javascript unit tests. However it is in LCOV format. As a Windows user running on Windows 2003, I can't just read the file since its perl/lunix…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
2
votes
1 answer

lcov, reporting 0% coverage for not tested headers

i will ask using an example. Let's suppose the following files: root - yes.h - not.h - test.cpp "test.cpp" includes "yes.h" when I run lcov shows the percentage covered in yes.h and in test.cpp, but (and here's my question) I want a…
Hugo
  • 2,139
  • 4
  • 22
  • 30
1
vote
1 answer

gcov froze when giving -a option?

When I do gcov . there is no problems. However, when I do gcov -a . gcov froze. The last few lines of the output is: File '/usr/include/boost/archive/detail/iserializer.hpp' Lines executed:78.18% of…
1
vote
0 answers

Jest is covering empty lines, comment lines and spaces in Source code

I'm using "jest": "^29.5.0", "jest-fetch-mock": "^3.0.3", "jest-sonar-reporter": "^2.0.0", Following is my jest.config.js: module.exports = { automock: false, clearMocks: true, collectCoverage: true, coverageDirectory:…
ayeshas7
  • 81
  • 5
1
vote
0 answers

Code coverage errors on templates using lcov and gcov

I'm trying to perform code coverage on several methods implemented in an interface based on templates (I know, it's a bit weird). The issue is that, testing with both lcov and gcov I get some extremely strange coverage results, where some functions…
AdCerros
  • 153
  • 1
  • 1
  • 11
1
vote
0 answers

Working example of JS code coverage under Bazel?

I have a project using the Bazel build tool with closure_js_library/closure_js_binary/closure_js_test rules for my JS. What I'm working on now is trying to get a code coverage report out of bazel coverage ... for those tests. Does anyone know of a…
BCS
  • 75,627
  • 68
  • 187
  • 294