[CMake] Coverage tests with gcov under Linux

Judicaël Bedouet j.bedouet at infonie.fr
Fri May 9 13:18:13 EDT 2008


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.

Thanks,

J. Bedouet


make Experimental
Scanning dependencies of target Experimental
   Site: silokk
   Build name: Linux-c++
Create new tag: 20080509-1653 - Experimental
Start processing tests
Configure project
   Each . represents 1024 bytes of output
    . Size of output: 0K
Build project
   Each symbol represents 1024 bytes of output.
   '!' represents an error and '*' a warning.
    . Size of output: 0K
   1 Compiler errors
   0 Compiler warnings
Test project /home/bedouet/build/CDashTest/build
  1/  1 Testing CDashTest1                       Passed

100% tests passed, 0 tests failed out of 1
Performing coverage
   Processing coverage (each . represents one file):
    .Unknown line: [Lignes exÃ(c)cutÃ(c)es: 88.89% de 9]
Unknown line: [Lignes exÃ(c)cutÃ(c)es: 100.00% de 1]
Unknown line: [Lignes exÃ(c)cutÃ(c)es: 0.00% de 2]

   Acumulating results (each . represents one file):
    .
        Covered LOC:         8
        Not covered LOC:     1
        Total LOC:           9
        Percentage Coverage: 88.89%
Submit files (using http)
   Using HTTP submit method
   Drop site: http://125.1.10.221/CDash/submit.php?project=test
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/Build.xml
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/Configure.xml
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/Coverage.xml
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/CoverageLog-0.xml
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/CoverageLog-1.xml
   Uploaded: /home/bedouet/build/CDashTest/build/Testing/20080509-1653/Test.xml
   Submission successful
Errors while running CTest
make[3]: *** [CMakeFiles/Experimental] Erreur 32
make[2]: *** [CMakeFiles/Experimental.dir/all] Erreur 2
make[1]: *** [CMakeFiles/Experimental.dir/rule] Erreur 2
make: *** [Experimental] Erreur 2



On Fri, May 9, 2008 at 6:46 PM, Judicaël Bedouet <j.bedouet at infonie.fr> wrote:
> I have just made a little project with CDashTest and it's the same problem.
> I have attached the sources files and the files generated under Linux
> and Cygwin.
>
> This time, I compiled with gcc 4.1 (g++ (GCC) 4.1.3 20070929
> (prerelease) (Ubuntu 4.1.2-16ubuntu2)). I suppose gcov version is 4.1.
>
> It's been a long time I have uninstalled CMake 2.4.8 and I have never
> done coverage tests before. I will try to reinstall it.
>
> J. Bedouet
>
>
> On Fri, May 9, 2008 at 5:01 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> Judicaël Bedouet wrote:
>>>
>>> Hello,
>>>
>>> I would like to exploit gcov results with CMake and CDash.
>>>
>>
>>>   Using HTTP submit method
>>>   Drop site: http://125.xxx.xxx.xxx/CDash/submit.php?project=BDGC
>>>   Uploaded: /home/xxxxxxxx/Testing/20080509-1423/Build.xml
>>>   Uploaded: /home/xxxxxxxx/Testing/20080509-1423/Configure.xml
>>>   Uploaded: /home/xxxxxxxx/Testing/20080509-1423/Coverage.xml
>>>   Uploaded: /home/xxxxxxxx/Testing/20080509-1423/CoverageLog-0.xml
>>>   Uploaded: /home/xxxxxxxx/Testing/20080509-1423/Test.xml
>>>   Submission successful
>>> Errors while running CTest
>>> make[3]: *** [CMakeFiles/Experimental] Erreur 40
>>> make[2]: *** [CMakeFiles/Experimental.dir/all] Erreur 2
>>> make[1]: *** [CMakeFiles/Experimental.dir/rule] Erreur 2
>>> make: *** [Experimental] Erreur
>>
>> I did just fix a bug in 2.6.0 with coverage and ctest:
>>
>> http://public.kitware.com/Bug/view.php?id=6988
>>
>> However, your problem sounds different.  Does the ctest from CMake 2.4.8
>> work for you?  What version of gcc/gcov are you using?  Perhaps the problem
>> is a new format from gcc/gcov?
>>
>> -Bill
>>
>>
>>
>


More information about the CMake mailing list