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
3
votes
0 answers

Lcov Coverage Innacurate

I am using lcov (version 1.14) and cobertura to generate a coverage analysis on our C++ code. (gcc version 4.9) After modifying the code, the code coverage went down inexplicably. Although we did not touch or remove any tests. For example, line…
ZeusCoder
  • 101
  • 2
3
votes
0 answers

gcov/lcov - How to exclude all but one directory from coverage data

I am creating code coverage reports for my C++ projects using gcov/lcov, and I am trying to remove all files except the ones in a certain directory from the coverage report (i.e. I do not want different dependencies in various folders to show up in…
pooya13
  • 2,060
  • 2
  • 23
  • 29
3
votes
2 answers

lcov remove option is not removing coverage data as expected

I'm using lcov to generate coverage reports. I have a tracefile (broker.info) with this content (relevant fragment shown): $ lcov -r…
fgalan
  • 11,732
  • 9
  • 46
  • 89
3
votes
0 answers

Gtest with lcov in c++

I have successfully generated the .gcda and .gcno files and they are in the same folder. The flags in the make file looks as below : CPPFLAGS += -std=c++11 --coverage -isystem $(GTEST_DIR)/include CXXFLAGS += -std=c++11 --coverage -g -Wall -Wextra…
Enjal Parajuli
  • 193
  • 1
  • 11
3
votes
1 answer

kcov vs lcov vs raw performance?

Anyone able to give me some info on the relative performance of code running under following conditions, Just compiled Compiled with --coverage Running under kcov Am I going to need twice a long to run my test suite if I integrated code coverage…
Paul D Smith
  • 639
  • 5
  • 16
3
votes
0 answers

gcov reports no coverage for class declaration

I have a C++ class, Foo. When I run gcov on my unit tests, it reports good coverage data for Foo's methods, but on the class declaration itself is reports nothing: 14 0 : class DllExport Foo: public Bar { 15 : protected: …
Nathan
  • 1,218
  • 3
  • 19
  • 35
3
votes
1 answer

Node application testing and LCOV report generation with Mocha

My group recently started working on a previously existing Node application written entirely in ES6 (its been through a couple of different developers prior to us working on it). The application is minimally unit tested using Mocha and Nyan as the…
user2360062
  • 663
  • 2
  • 7
  • 19
3
votes
2 answers

gcov function is not executed but lines are

I have been using gcov to check code coverage. I now get a weird result, some functions are listed as not executed but the lines in the function is listed as executed. lcov output: 13 0 : f& operator*=(f& lhs, const…
Jonas
  • 6,915
  • 8
  • 35
  • 53
3
votes
0 answers

lcov appears to process .gcda files in a single process. I have many cores and I'd like to use them for this processing. How?

If I run: lcov --output-file $(BUILD_DIR)/coverage_all.info --capture --directory $(BUILD_DIR) It appears to process each .gcda file one at a time instead of taking advantage of all my cores. Is it possible to rewrite this step so that I can…
Mikey
  • 423
  • 1
  • 3
  • 9
3
votes
1 answer

Sonarqube does not retrieve my JavaScript coverage from LCOV

I have an application with the following structure: my-application +- pom.xml +- app | +- scripts | | +- app.js | | +- **/*.js | +- 3rd-party-libs +- build +- node_modules +- test I've create the pom.xml only to run…
Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273
3
votes
0 answers

LCov - Found unrecognized record format errors

I've looking to get an HTML code coverage report working with an XCode 6.1 based project. My solution 'partially works', but I'm getting a lot of skipped files when running lcov: geninfo: file found unrecognized record format - skipping Some…
3
votes
0 answers

lcov and gcovr option for ignoring compiler generated dead code

My team is looking for a way to get around gcov reporting branch coverage for dead/compiler generated code. I noticed that gcovr has an option --exclude-unreachable-branches that seems to do what we need. Also, lcov has the option --no-markers which…
wizurd
  • 3,541
  • 3
  • 33
  • 50
3
votes
3 answers

lcov not working properly for coverage

I am trying to get html coverage for a test using gcc 4.8.2 and lcov 1.10. I am sure that my source, objects and gcov files are at same place and that I'm running lcov from directory where I ran my compiler from as well. I'm getting the following…
risaldar
  • 71
  • 1
  • 2
  • 10
3
votes
1 answer

LCOV reports: 'geninfo: Negative length'

I'm analyzing C-Code with LCOV on two systems (windows 7, cygwin, Lcov 1.10). On one system I had never problems, but on the other with the same code I get: $ lcov --directory CMakeFiles/UnitTest.dir/main --capture --output-file lcov.log Capturing…
Led
  • 154
  • 1
  • 3
  • 12
3
votes
0 answers

C++ entire codebase coverage w/ gcov

We have a large body of C/C++ code that is cross-compiled for an embedded Linux target. We've recently begun implementing unit tests (using gmock/gtest) that are run on our development server (which is Linux as well). The unit tests are executed…
Curt C
  • 31
  • 1