gcov parsing errors in gcovr

Bug #1086695 reported by Martin Mrazik
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gcovr
Fix Released
Undecided
Unassigned

Bug Description

This is the output of make coverage-xml from compiz (but unity has the same issue too):

/usr/bin/cmake -P "/tmp/buildd/compiz-0.9.9~bzr3502pkg0quantal118/obj-i686-linux-gnu/coverage-xml.cmake"
(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.(WARNING) Unrecognized GCOV output: '====='
 This is indicitive of a gcov output parse error.
 Please report this to the gcovr developers.make[3]: Leaving directory `/tmp/buildd/compiz-0.9.9~bzr3502pkg0quantal118/obj-i686-linux-gnu'

Revision history for this message
LeForgeron (jgrimbert) wrote :

Happen to me also.
Seems due to using g++/gcc 4.7 (does not occurs with 4.6, which is currently the LTS version).
(I use gcovr on private sources (think "big hello world!"), it's unrelated to compiz)

lcov/geninfo has an easy patch (circa line 1640 : replace
      if ($count eq "#####")
with
      if ($count eq "#####" or $count eq "=====")

)

Something similar should be possible (probably arround line 395 of the gcovr script, on the 13 April 2012 release)

Technical details:
* system: Ubuntu 12.10, amd64,
* g++ 4.7.2,
* gcov 4.7.2

Revision history for this message
Michi Henning (michihenning) wrote :

Here are the diffs for geninfo and gcovr.

$ diff geninfo.orig geninfo
1836c1836,1837
< if ($count eq "#####") {
---
> if ($count eq "#####"
> or $count eq "=====") {

$ diff gcovr.orig gcovr
395c395
< if tmp[0] == '#':
---
> if tmp[0] == '#' or tmp[0] == '=':

Revision history for this message
Markhor (markhor) wrote :

So Michi Henning did fix this bug in April, will anybody apply his patch?

Revision history for this message
James Henstridge (jamesh) wrote :

It looks like gcovr was updated some time in the last few years to handle this output (probably version 3.0?).

The lcov package was patched in Debian package version 1.10-1 according to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699565

So this problem has been fixed for a number of Ubuntu releases now.

Changed in gcovr:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.