[CMake] Code Coverage & Bullseye

David Cole dlrdave at aol.com
Wed Sep 17 08:22:52 EDT 2014


> I am trying to configure the code coverage using the ctest script. I
> took help from : http://www.cmake.org/Wiki/CTest/Coverage

That wiki page was mostly written in 2007 and 2009. You may want to
refer to something more recent than that, and something that's proven
to work, like an existing dashboard script that does coverage, as a
reference.

One thing to note: there may not be a working example of somebody doing
code coverage using the Xcode generator on a Mac. If there is,
hopefully he will speak up here, and give you some additional hints.

You might have better luck doing a coverage dashboard on Linux using
gcc and gcov.

See the scripts used for coverage dashboards on the CMake dashboard...
for example, this one:

http://open.cdash.org/viewNotes.php?buildid=3493343

Especially note the use of the -fprofile-arcs -ftest-coverage flags in
the script. (Mentioned on that wiki page, I might add.)


> Is Bullseye is mandatory for code coverage using ctest ???
> Is there any way to perform code coverage through ctest without using
> bullseye ??

Bullseye is absolutely NOT mandatory for code coverage testing using
ctest, it's simply one of the available options.

If you do not have Bullseye, there is no need to set the COVFILE env
variable.


HTH,
David C.




More information about the CMake mailing list