Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #3898 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

gcovr only works with english language

Reported by: jwienke@… Owned by: jdsiiro
Priority: normal Milestone:
Component: gcovr Version:
Keywords: Cc: wehart

Description

Parsing of gcov output files is e.g. broken for German. Here, gcov outputs the following:

File: »/usr/include/boost/smart_ptr/shared_ptr.hpp«
0.00% von 5 Zeilen ausgeführt
0.00% von 2 Zweigen ausgeführt
0.00% von 2 Zweigen mindestens einmal genommen
0.00% von 4 Aufruf(en) ausgeführt
/usr/include/boost/smart_ptr/shared_ptr.hpp: »#usr#include#boost#smart_ptr#shared_ptr.hpp.gcov« wird erzeugt

Attachments

Change History

comment:1 Changed 3 years ago by jdsiiro

  • Cc wehart added
  • Owner changed from wehart to jdsiiro
  • Status changed from new to assigned
  • Component changed from EXACT to gcovr
  • Reporter changed from jwienke@… to jwienke@…

From this output, I am not sure what is going on.

In order to help debug the problem, can you answer the following:

  • What version of gcovr?
  • What version of gcov?
  • What platform and compiler stack?
  • Can you submit a (minimal) test case that reproduces this error?

Please bear in mind that I do not have access to a test or development machine that is set up for any locale other than en_US. Without a reproducible test case (probably including the actual results and output produced by gcov), it is not likely that we will make much progress resolving this issue.

Patches are always welcome.

comment:2 Changed 3 years ago by jwienke@…

What you see above is basically the gcov output for every file. To avoid this problem I would propose just to set the LANG environment variable for the gcov call to "en". This already solves the problem for me.

gcovr was trunk version from that day.

languitar@herbie:~$ gcov --version
gcov (GCC) 4.5.2 20110127 (prerelease)
languitar@herbie:~$ uname -a
Linux herbie 2.6.37-ARCH #1 SMP PREEMPT Fri Mar 25 15:10:00 CET 2011 x86_64 Intel(R) Core(TM)2 Duo CPU L9400 @ 1.86GHz GenuineIntel GNU/Linux

The minimal test case is basically every project if you have a German locale. ;)

comment:3 Changed 3 years ago by jdsiiro

#3902 closed as a duplicate of this ticket.

comment:4 Changed 2 years ago by jdsiiro

Referenced in changeset [2760]:

Force gcov to run with LC_ALL = en_US. This should guarantee that the output is in English, even when run in non-English locales.

Fixes #3898 (and #3902).

comment:5 Changed 2 years ago by jdsiiro

  • Status changed from assigned to closed
  • Resolution set to fixed

Resolved in r2760.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.