[CMake] Problem getting coverage to work with gcov

David Cole david.cole at kitware.com
Wed Oct 29 15:44:45 EDT 2008


Well it works with your smaller examples, but not your large project......
What (besides small vs. large) is different between the projects?

The message "Cannot find any GCov coverage files" means that there are no
*.da or *.gcda gcov output files in the entire binary tree. We do a
recursive find on those file names to collect all the coverage info.

Did you run any of the tests with the coverage info in there before trying
to run ctest to analyze the coverage results? (i.e., does "make test" in
your large project actually execute some tests that should produce coverage
info...?)


??


On Wed, Oct 29, 2008 at 3:02 PM, Iman Brouwer <iman.brouwer at gmail.com>wrote:

> make
> make test
> ctest -T Coverage
>
> Produces beautiful output on smaller projects I created but when I use it
> with our main large software, it doesn't produce the coverage files:
>
> ~/MainProject/trunk_build_coverage $ctest -VV -T Coverage
> UpdateCTestConfiguration  from
> :/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
> Parse Config
> file:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
>    Site: haptic1
>    Build name: Linux-c++
> Start processing tests
> UpdateCTestConfiguration  from
> :/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
> Parse Config
> file:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
> Performing coverage
>  COVFILE environment variable not found, not running  bullseye
>  Cannot find any GCov coverage files.
>  Cannot find any Python Trace.py coverage files.
>  Cannot find any coverage files. Ignoring Coverage request.
>
> If anybody has any pointers on how to proceed, I would be very grateful. I
> spend two days on getting it to work, but i'm out of ideas what to try next.
> Unfortunately the small projects I created to test coverage all work, only
> the larger more complicated project results in the above error... General
> testing and testing with valgrind work in this larger project, it's just the
> coverage test that fails to run.
>
> Thanks,
>
> Iman Brouwer
>
> P.S. Below are some essential parts of my configuration:
>
> In have the following line in my main CMakeLists.txt:
> INCLUDE(CTest)
>
> and the following variables are in my CMakeCache.txt (flags taken from the
> cmake wiki )
>
> //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
> // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
> CMAKE_BUILD_TYPE:STRING=Debug
>
> //Flags used by the compiler during debug builds.
> CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 -Wall -W -Wshadow -Wunused-variable
> -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers
> -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs
> -ftest-coverage
>
> //Flags used by the compiler during debug builds.
> CMAKE_C_FLAGS_DEBUG:STRING=-g -O0 -Wall -W -fprofile-arcs -ftest-coverage
>
> //Flags used by the linker during debug builds.
> CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=-fprofile-arcs -ftest-coverage
>
> //Path to the coverage program that CTest uses for performing coverage
> // inspection
> COVERAGE_COMMAND:FILEPATH=/usr/bin/gcov
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081029/7f36a433/attachment-0001.htm>


More information about the CMake mailing list