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

Makefile: generic way to indccate all available .info file from one folder to lcov

I'm working on some tests and I'm using lcov In order to correctly manage the coverage of all tests, my makefile: compile each test launch the test generate the .info file using geninfo delete *.gcda, *.gcno When this is made for all tests, I want…
Fred74
  • 3
  • 1
0
votes
1 answer

merge branch coverage of two or more runs with lcov

How can I merge branch coverage of two or more runs? Is any tool or lcov command exist? Let's say that I have two test runs and would like to see summary branch coverage gcc -O0 --coverage main.c -o test-coverage test-coverage param1 lcov --capture…
0
votes
2 answers

.gcda file coverage info not getting updated when two executables run for same source file

There are three files u1.c , u2.c and common.c content of ut1.c #include void fun1(); int main(){ fun1(); } content of ut2.c #include void fun2(); int main(){ fun2(); } content of common.c void fun1(){ …
Learner09
  • 9
  • 1
  • 5
0
votes
1 answer

gcov/lcov + googletest create an artificially low branch coverage report

First, I am well aware of the "hidden branch" problem caused by throws/exceptions. This is not that. What I am observing is: My test framework (googletest) has testing macros (EXPECT_TRUE for example). I write passing tests using the…
sam
  • 488
  • 8
  • 21
0
votes
1 answer

Query on clang Code Coverage and gcov version

I am doing gcov processing of code compiled using clang. But my report is getting generated using gcov4.6. And the developer told me GNU on FreeBSD stopped around 2012 when they upgraded their license to GPLv3. So how is it using gcov4.6 and not…
0
votes
0 answers

lcov reports incomplete coverage for stream operators

When I use a stream operator, gcov/lcov report a branch not covered. For example : namespace { const std::string LinuxBuildVersionFile = "/etc/linux.build.version"; } std::string GetLinuxBuildVersion() { …
Oodini
  • 829
  • 1
  • 6
  • 16
0
votes
1 answer

lcov shows my code does not covered by test but actually it did

I found my coverage report generated by the lcov is not correct. I'm sure some code lines be tested according to the log I print out. But the coverage report shows it did not. The code is written in C language. The compile flags is '-g -O0…
Shuduo
  • 727
  • 5
  • 14
0
votes
1 answer

How to remove sections of lcov-report completely using nyc?

*I'm using the @cypress/code-coverage plugin. I have tried to include only the directory I want: { "extends": "@istanbuljs/nyc-config-typescript", "all": true, "report-dir": "cypress-coverage", "reporter": ["text-summary", "lcov"], …
jameseg
  • 730
  • 1
  • 4
  • 19
0
votes
1 answer

cant create coverage informations with lcov WARNING: no .gcda files found in ./coverage

I have been trying to get code coverage working for Qt but im struggling with generating any coverage information Project example.pro (contains include for googletest.pri) gtest_dependency (contains googletest.pri headerfiles for…
resist
  • 1
  • 2
0
votes
0 answers

How to read only line coverage from lcov --summary command and store in some shell script variable?

When I run the command lcov --summary coverage/lcov.info Im getting the output in the console as below Summary coverage rate: lines......: 80.5% (4900 of 6090 lines) functions..: no data found branches...: no data found I just want to save the…
Uday
  • 1,619
  • 3
  • 23
  • 48
0
votes
1 answer

How to generate HTML reports of coverage information using gcov?

I want to generate HTML reports of result of coverage information of code written c++. what is the command to generate it ? I was using File 'c:/mingw/lib/gcc/mingw32/6.3.0/include/c++/iostream' Lines executed:100.00% of 1 Creating…
0
votes
2 answers

Cannot run genhtml in dart project

I'm a newbie, I wanna learn Dart language.So basically I wanna display my coverage report. Follow in this https://pub.dev/packages/test_coverage. When I using genhtml command it not working 'genhtml' is not recognized as an internal or external…
0
votes
1 answer

Sonar Coverage: file path in lcov coverage report isn't correct

Sonar build is failed in bamboo because of LCOV.info file path is wrong. I have added script also in the Bamboo pipeline to find exact path for lcov.info and I am not getting any exact path in the log I am looking for. what do I need to add in the…
learner
  • 223
  • 3
  • 19
0
votes
0 answers

When I use Lcov with --rc lcov_branch_coverage=1 an ERROR happens

like this, when I use cmd like follow: lcov -c --rc lcov_branch_coverage=1 -d . -b . -o test.info it will (click on image for complete path) genfino: ERROR: GCOV failed for /root/.../d3a CoreCodeunitrpcommondrvd3amakeimptgunitrpdpf.dir/root/One…
陈玉杰
  • 1
  • 1
0
votes
0 answers

Code coverage ( *.cpp.gcda: CANNOT OPEN) is not working

I want to code coverage with gcov & lcov. But I got a few error.I think My CMakeLists is not providing ".gcda" files or is not finding ".gcda" files. I tried a lot of solutions. Such as; - I looked at similar projects and rearranged: For example:…