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

Lcov process is stuck in file read

I am running lcov to capture the code coverage but my lcov process is stuck somewhere. Here is the strace and lsof output: strace -p 9167 strace: Process 9167 attached fcntl(3, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,…
0
votes
1 answer

How is the -fprofile-prefix-path option supposed to work?

When compiling code for coverage instrumentation (to use with lcov later on), we're compiling from a base directory tree (let's call it A), and we want the .gcda files to be produced at a different place (because the target directory tree is…
Kzwix
  • 161
  • 7
0
votes
1 answer

Force error when lcov code coverage is not above threshold

I have a c++ project that uses CMake for generating makefiles. I have added a custom target to run the code coverage as follows: add_custom_target( coverage COMMAND lcov --rc lcov_branch_coverage=1 --capture --directory …
apalomer
  • 1,895
  • 14
  • 36
0
votes
0 answers

Ignore freezed.dart and .g.dart files from lcov.info in flutter

Im trying to get a code coverage report following the below steps. flutter test --coverage genhtml coverage/lcov.info -o coverage/html open coverage/html/index.html I want the generated files to be removed from the report. i treid.. lcov --remove…
Mohammed Niyaz
  • 159
  • 1
  • 6
0
votes
0 answers

How to Generate code coverage report using Gtest on Windows by using Gcov and Lcov

I am using gtest for testing my code in C++ with Vs code, I am able to generate test report, but I could not genetare gtest code coverage report, I installed gcov lcov. I would like to know that, is there any way to find out the code coverage gtest…
0
votes
0 answers

Code coverage difference between LCOV reports

I have an assignment of displaying the difference in coverage data between two coverage reports. For example, suppose I already have a GCOV and corresponding LCOV file, and then I made some changes and generated new GCOV and LCOV files. Now, I want…
0
votes
0 answers

LCOV report combine same file from different source paths

this is a follow-up question to this question I posted yesterday: capture coverage data in parallel with lcov I'm trying to process the .gcda files from different runs of the same source code in parallel: lcov --gcov-tool…
Wolf
  • 77
  • 8
0
votes
0 answers

capture coverage data in parallel with lcov

I'm testing a project and generating a coverage report to it. To test faster I distribute the tests to multiple machines, and to run the tests each machine runs multiple VMs running the same source code. After running the tests, machine by machine,…
Wolf
  • 77
  • 8
0
votes
0 answers

Detect different lines executed with lcov?

I have minimal input that causes my program to fail and a one line hack to restore the correct result. I don't know why the better numbers make my program fail. Is there an easy way to use lcov to compare the two different executions? Most likely…
0
votes
0 answers

Is there a feature in gcov to focus on my code changes

I made some changes on my source code (let's say I changed/added 10 lines) and want to check the coverage for only these 10 lines. Is there any feature in gcov that can help me on this and get the coverage of only these 10 lines.
niraj pandey
  • 102
  • 7
0
votes
0 answers

LCOV/GCOV - code coverage : Not able to get line coverage even code executed

I am able to compile code properly with --coverage, but there is some file which is included in other file like below (format of file is same but name changed for privacy): file a.c : #include l.c #include m.c make.depend: a.o :…
Shivam
  • 211
  • 1
  • 13
0
votes
2 answers

coverage fails to generate coverage.lcov

I'm having trouble generating coverage.lcov running github action in a monorepo (using melos) I think the problem may be caused by coverage, but it's also possible that I have missed some breaking change (the past year I was busy) this is the…
Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85
0
votes
1 answer

cygwin lcov genhtml: ERROR: cannot create directory ?

I am executing the following command, which is resulting in the error below. I have chmod 777 to all directories involved. The css and image files are written successfully, but the html file(s) is not getting generated. What am I do worng? perl…
Jason
  • 21
  • 2
0
votes
1 answer

genhtml: ERROR: cannot read /Users/..../cover/Masonry/Masonry/MASUtilities.h

I put the. Gcno and. Gcda files in the cover folder and execute the command. lcov --capture --directory cover --output-file coverage.info --no-recursion Errors encountered are as follows: Processing RFPushView.gcda geninfo: WARNING: could not open…
lauren1573
  • 293
  • 1
  • 2
  • 9
0
votes
1 answer

Lcov: Branch coverage report display some info Exactly don't know what it mean (i.e Branch 5 was not taken)

Please find the below LCOV Report of my code: 83 : 84 : uint8_t a = 0; 84 [ + - ]: 84 : ret = check_uint(section, VALUE, &a); 85 [ + + ]: 84 : if (success != ret) {​ 86 [ + -…