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

Is it possible to show trends from an lcov report in jenkins?

I have an lcov report which produces a pretty html report and an lcov.info file. I want to see on jenkins whether our code coverage is improving or degrading. Is it possible to do this with an lcov report? I can do it using cobertura, but for…
rozza
  • 927
  • 2
  • 11
  • 24
2
votes
1 answer

lcov.info not getting scanned by sonarqube

I am trying to scan the coverage of my code using coverageIstanbulReporter on the sonarqube. Here is my karma.conf.js file: module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular/cli'], plugins:…
Achal
  • 133
  • 2
  • 12
2
votes
1 answer

Some code is not removed from the code coverage

I want to generate a code coverage report for my Qt/C++ project. I have a short version with a class inheriting QObject: #include class Baba : public QObject { Q_OBJECT public: Baba(); void mange(int a); signals: void…
Martin Delille
  • 11,360
  • 15
  • 65
  • 132
2
votes
0 answers

Coverage report when source and objects are in different directories

I am trying to generate coverage report for my project and running into a problem. I understand that to get the coverage info, I need .gcno, .gcda and source files. My current project dir structure is /root/proj/src --> top level Makefile and…
CodeTry
  • 312
  • 1
  • 19
2
votes
1 answer

SonarJS code coverage is shown as 0

I am using SonarQube 6.5, And trying import lcov.info file for code coverage using sonar.javascript.lcov.reportPaths property. My build is done using Jenkins. code is deployed and tested at /path/to/Deploydirectory/parent-project1/project1/ and…
PPB
  • 287
  • 3
  • 7
  • 19
2
votes
1 answer

Removing files from lcov tracefile using relative paths

I am attempting to remove certain directories from my lcov tracefile, but am not having any success. I am attempting to use relative paths, and I am using cygwin. My test framework is cpputest. My directory structure looks like this foo_library $…
Nick
  • 1,361
  • 1
  • 14
  • 42
2
votes
2 answers

Can GCOV create .gcda file in the different directory structure?

I am trying to generate code coverage report using lcov from home directory. Sorce code is compiled with -coverage option to generate coverage information at compilation time(gcno files are created). Then I have copied the executables and gcno…
himsikha
  • 101
  • 2
  • 11
2
votes
0 answers

lcov genhtml 'no data found' issue

I am using the latest version of lcov downloaded from here http://ltp.sourceforge.net/coverage/lcov.php on Windows 10. I am able to generate .gcda, .gcno, and .info files that appear valid. Also, when I run gcov, it outputs a valid .gcov file.…
hacksoi
  • 1,301
  • 13
  • 23
2
votes
1 answer

SonarCloud coverage report from create-react-app tests

I have a project I'm working on for my senior project. This project was bootstrapped with create-react-app, and I added some config to ensure that coverage reports are generate. I integrated the project with Travis CI, SonarCloud, and Heroku. I…
2
votes
1 answer

How to get coverage information for each run on Gcov (or Gcovr)?

I'm trying to get coverage information for each of my test cases (and also the total coverage). But since .gcda file will be merged everytime the program runs, it's not possible unless the file is deleted/moved. The problem of deleting the .gcda…
AceVez
  • 291
  • 1
  • 5
  • 19
2
votes
1 answer

How to upgrade lcov if you already have one in ubuntu?

I have lcov installed on my ubuntu 10.1. My lcov version is 1.8, how do I upgrade to the latest version, which is 1.9?
cpp_noob
  • 253
  • 2
  • 6
  • 12
2
votes
2 answers

Alternative to calling target_link_libraries in subdirectory

Case: I've declared a function setup_target_for_coverage in a separate .cmake-script, added to CMAKE_MODULE_PATH, which prepares a target (mylib) for code coverage analysis. setup_target_for_coverage is called from a subdirectory to mylib…
helmesjo
  • 625
  • 5
  • 17
2
votes
1 answer

LCOV to exclude entire packages from code coverage analysis

I'm using LCOV as my graphical means of code coverage to tell me how much of my code I've tested, however it's including folders of code which I do not care about and it's making my coverage lower than it should actually be. Is there a way exclude…
arabian_albert
  • 708
  • 1
  • 11
  • 24
2
votes
1 answer

lcov how to cover static initialization and destruction function

In this page: https://servernl1.sveena.com/lcov3987/c/s/c/port/lin/lindow.cpp.func-sort-c.html there is this function __static_initialization_and_destruction_0(int, int) that is not covered. What is this function? It is not in the source. How do I…
Shankar
  • 51
  • 5
2
votes
2 answers

C++ lcov reached unexpected end of file

I try to create a coverage report. I use make clean all and make coverage. I have Boost and lcov installed. But when I try make coverage it fails with the following error message: Processing…
Peter111
  • 803
  • 3
  • 11
  • 21