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
1
vote
1 answer

Code Coverage on Windows with proprietary testing automation

We have our own test automation software which executes our product exe. We do not have test cases written in C++ but our code is written in C++. What we want is to run out automation tool on our exe which will run the test suite and then find the…
Mudassir Razvi
  • 1,783
  • 12
  • 33
1
vote
1 answer

Wrong coverage data for unit tests of a library

I want to test a complex shared library (cxsc) with the help of cmake. After a lot of trial and error i managed to create a html coverage report but the lines I test, with the boost testing framework, are still red. This is the script I use to…
Tim
  • 929
  • 1
  • 14
  • 28
1
vote
1 answer

Hiding C sources when using lcov with a language transpiled to C

I'm experimenting with a language (ooc) that transpiles into C and is then compiled using gcc. I want to check code coverage for a project written in this language and display it using lcov and genhtml. The C code has #line references throughout the…
naslundx
  • 181
  • 1
  • 4
1
vote
0 answers

how to initialize llvm coverage directly from a shared library?

I am testing a C/C++ shared library where I have compiled the library with the -fprofile-arcs -ftest-coverage -pg flags and linked with -fprofile-arcs -ftest-coverage flags. I am loading, and testing the shared library in Python via the ctypes…
Sam P
  • 681
  • 5
  • 19
1
vote
0 answers

Trigger points in Code coverage using GNU libs GCOV, LCOV for SystemC?

I am using GNU Libs GCOV, and LCOV in SystemC for code coverage analysis. Everything works fine, but I was wondering if it's possible to have trigger points? just like oscilloscope has a trigger option, which captures the state at the trigger point.…
Muhammad Hassan
  • 501
  • 1
  • 4
  • 14
1
vote
0 answers

sonar-runner lcov report discrepency

SonarQube Community, When doing an analysis of a Node/JS project the coverage valued reported via istanbul show much different than what gets reported and shows on our SonarQube server. Our SonarQube server is at 4.5.4 Our sonar-runner version is…
1
vote
0 answers

Is it normal for gcov to peg the CPU at 100%

I'm running gcov (through lcov) over a medium-sized project. It's had the CPU at close to 100% for quite a while (not sure exactly how long, but over 30 minutes). The memory isn't ballooning. It seems to be stuck on one task. Is it normal for gcov…
Joe
  • 46,419
  • 33
  • 155
  • 245
1
vote
2 answers

clang -coverage marks function signatures as not covered

I'm trying to use clang -coverage to generate coverage information for my C project, but all the function signatures are marked as not covered, when I'd expect them to be not instrumented at all. Small example -- this file is hello.c: extern int…
Ismail Badawi
  • 36,054
  • 7
  • 85
  • 97
1
vote
1 answer

gcov line count is different from no of lines in source code

output of gcov says no of lines executed 70 % of 10 but my code has more than 10 lines.. it does not count braces , else statement please help ..
sarath
  • 31
  • 4
1
vote
2 answers

geninfo searches .da instead of .gcda

When I try to execute the following lcov command through Plink (I give Plink a text file as an argument containing the following command) lcov --capture --directory . --output-file coverage.info it results with GNU gcov version 1.5 Capturing…
ronstudy1
  • 116
  • 1
  • 8
1
vote
0 answers

LCOV does not work with new Xcode 5.1

I am using LCOV to get the code coverage for my iOS app but its not working with Xcode 5.1 anymore. It used to writ with older Xcode. So i googled a little bit and found this:https://github.com/jonreid/XcodeCoverage which seems to work but doesn't…
Ashutosh
  • 5,614
  • 13
  • 52
  • 84
1
vote
2 answers

Can we find executable lines of code in a C/C++ source file with gcov

gcov primarily is a code coverage tool. However, is there any way we can find LOC (excluding comments...etc) with gcov? It must be easy for gcov to get that information, but I didn't find any documentation on that. Also, let me know if you know any…
ernesto
  • 1,899
  • 4
  • 26
  • 39
1
vote
1 answer

lcov is Failing at geninfo Initialization

I am trying to generate lcov (version: 1.9) data within the following source directory: src/ foo.o foo.gcno test/inc foo.h test/src foo.cc Note: that the src/ directory does contain the .gcno file I need, but when I…
Jake88
  • 955
  • 1
  • 19
  • 39
1
vote
1 answer

Error on syntax for generating coverage data from multiple files using lcov in Windows

I would like some help... I'm having trouble coming up with the syntax to generate coverage data from multiple files using lcov in Windows. I have gcov, lcov and genhtml installed on cygwin (I'm running this under Windows). All of those files are…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
1
vote
0 answers

Why doesn't lcov report exception coverage?

Refer to this coverage report . . I know that my test cases are exercising the exception handling, however the lines are still being reported as not covered. . . This has been the case in all of my objective-c projects for a while now. . . . is…
Jasper Blues
  • 28,258
  • 22
  • 102
  • 185