Questions tagged [gcovr]

114 questions
1
vote
1 answer

Keep Gcov Test name in GCDA files

After having performed my test coverage on my product using lcov (for C++ dev), i'd like to draw a matrix to have the correspondence between the test name and the files it covers. The idea is to have a quick view of the code covered by 1 test…
Totoc1001
  • 338
  • 2
  • 11
1
vote
1 answer

gcovr: How to use Cygwin gcovr package?

I'm using gcov already to get code coverage results. I want to use gcovr. I've installed the gcovr package from Cygwin. Now, I've never used Python. I'm confused because I've got C:\cygwin\lib\python2.7\site-packages\gcovr with init.py, init.pyc…
User_MK
  • 63
  • 1
  • 6
1
vote
1 answer

Low branch coverage especially when using 3rd party libs. ex boost

I have problems understanding branch coverage in c++. Even for a simple program the branch coverage is 50%. When i use boost the branch coverage is below 20%. Could someone explain me why this is happening? I am using -fno-exceptions -g -O0…
Mihai
  • 972
  • 2
  • 13
  • 35
1
vote
1 answer

How to get method level coverage with gcovr?

I've been working with gcovr to generate coverage data for my whole project. I am able to generate summary reports like this: ------------------------------------------------------------------------------ GCC Code Coverage…
Vikas Tawniya
  • 1,323
  • 1
  • 13
  • 22
1
vote
1 answer

gcovr folder level summaries

I have a project structured like this: /path/to/source/A/ChildA1/A1.cpp /path/to/source/A/ChildA2/A2.cpp /path/to/source/B/ChildB1/B1.cpp /path/to/source/B/ChildB2/B2.cpp The highest level coverage report shows me summaries for each folder that…
David Doria
  • 9,873
  • 17
  • 85
  • 147
1
vote
1 answer

GCOVR giving empty results zero percent in MAC

I have the .gcda and .gcno files in a folder, from which I am running the below command. $ gcovr -r . and the result is as below if I run gcov on the gcda files I get the proper coverage value.
1
vote
2 answers

LCOV_EXCL_START/STOP has no effect when using gcovr

When I add LCOV_EXCL_START/STOP tags to my C++ code, it does not seem to have any effect on my gcovr report. Does someone know why this occurs? I have the following: $ tree . ├── build ├── include │   └── a.h └── tests └── test_a.cpp and $ cat…
jsp
  • 1,225
  • 11
  • 21
1
vote
2 answers

Automated Coverage Testing C Program using gcovr Linux with perl

I want to test 2 C programs to check it's coverage (line coverage and branch coverage). I am using gcovr in linux system. To do this, I have written a Perl Script that will call gcc compiler and read input from the file, then gives test for the…
Iman Tumorang
  • 131
  • 2
  • 9
  • 25
1
vote
2 answers

gcovr infinite loop when root directory specified

Background I am using the python tool gcovr to produce coverage data for some of my c projects. I am able to get the coverage data with no problems, but I'm not able to see which lines of code are covered due to a problem with the tool finding my…
Dodzi Dzakuma
  • 1,406
  • 2
  • 21
  • 39
1
vote
4 answers

gcovr with jenkins doesn't work

I am trying to produce code coverage report using gcovr from Jenkins but to no avail, it doesn't produce the result but if I run it from terminal, it works fine. here is the command i am executing thru jenkins to generate the same : gcovr -r…
sahiljain
  • 2,215
  • 1
  • 29
  • 39
0
votes
0 answers

GCOVR - File not found

Windows 11 GCOV v6.0 Python 3.11.3 gcc.exe (Rev2, Built by MSYS2 project) 12.1.0 gcov (Rev2, Built by MSYS2 project) 12.1.0 I compile my project, run the executable and get a full set of .gcda and .gcno files as expected, however when I run: gcovr…
0
votes
2 answers

Gcov 6.0 with Ceedling 0.31.1 generates empty html report

I am trying to generate a html report using ceedling and gcov. But I keep getting a empty html report. I have added report_include like this link mentions at the bottom of the page -…
Joe
  • 37
  • 8
0
votes
1 answer

Which can be sued to generate the code coverage report for Qt test cases,lcov or gcovr

Some references states that Qt is not covred using lcov. So need to confirm wheater lcov or gcovr be used for Qt.
0
votes
1 answer

SonarQube shows lines as "Not covered by tests" when gcov reports 100% coverage

I am using SonarQube Server to display code coverage reports on a C++ project (using gcov to generate reports). For some files in my project, there are lines in SonarQube that display as "not covered by tests" when the gcov report shows otherwise…
0
votes
1 answer

Cmake custom target command does not work on all inputs

I am building a number of sources and then running gcovr with JSON output: foreach(COMPONENT IN LISTS BLAHDIBLAH) ... add_custom_command(TARGET ${COMPONENT}_coverage COMMAND gcovr --exclude-unreachable-branches -k -r…
Walkingbeard
  • 590
  • 5
  • 15