[CMake] Coverage tests with gcov under Linux

John Doe ufnoise at gmail.com
Fri May 9 17:56:17 EDT 2008


in tcsh:

setenv LC_ALL POSIX

or if you need utf-8

setenv LC_ALL en_US.UTF-8

In bash:
export LC_ALL=en_US.UTF-8


Regards,

Juan

On Fri, May 9, 2008 at 12:40 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Judicaël Bedouet wrote:
>>
>> I have just tested with an other machine (a Fedora core 6). It's
>> better but it's a tricky thing : gcc version is 4.1 (g++ (GCC) 4.1.2
>> 20070626 (Red Hat 4.1.2-13)). First machine is an XUbuntu.
>>
>> The file main.cxx is yet marked as UNTESTED under CDash. So, I tried
>> with CMake 2.4-6, which is provided by Fedora, and with this version,
>> I can see the line which is not covered.
>>
>> As soon as I can, I will download the lastest CVS version to see if
>> the UNTESTED problem is resolved but I can't understand why under
>> XUbuntu I can't have coverage results.
>>
>>
>
> The problem is here:
>
> Unknown line: [Lignes exécutées: 57.14% de 21]
> Unknown line: [File « /usr/include/c++/4.2/iostream »]
> Unknown line: [Lignes exécutées: 100.00% de 1]
> Unknown line: [File « /home/xxxxxxxx/cvs/xxxxxxx/Key.h »]
> Unknown line: [Lignes exécutées: 100.00% de 4]
>
>
> Looks like it is the French that is messing things up...
>
> CTest has some regex stuff to parse the output of gcov:
>
>  std::string st2gcovOutputRex1 = "^File *[`'](.*)'$";
>  std::string st2gcovOutputRex2
>    = "Lines executed: *[0-9]+\\.[0-9]+% of [0-9]+$";
> ...
> If none of those regex expressions are matched it does this:
>
>    cmCTestLog(this->CTest, ERROR_MESSAGE,
>          "Unknown line: [" << line->c_str() << "]" << std::endl);
>        cont->Error ++;
>
>
> Your gcov has be internationalized and is not talking French, CTest does not
> speak French.  Is there an environment variable that can turn that off?
>
> -Bill
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list