[CMake] Code Coverage & Bullseye

Rajeev Kumar rajeevkumar235813 at gmail.com
Tue Sep 16 02:43:40 EDT 2014


Hi,

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































*cmake_minimum_required(VERSION 3.0)set(CTEST_SOURCE_DIRECTORY
/Users/rajekumar/work/test-codes/Test)set(CTEST_BINARY_DIRECTORY
/Users/rajekumar/work/test-codes/Test/out/)#set(CTEST_SITE
"http://oak-vcs187.lab.nbttech.com
<http://oak-vcs187.lab.nbttech.com>")set(CTEST_BUILD_NAME
"MacOSX")set(CTEST_CMAKE_GENERATOR "Xcode")set(CTEST_BUILD_COMMAND
"xcodebuild")set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov")set(ENV{COVFILE}
"${CTEST_BINARY_DIRECTORY}/CMake.cov")ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")ctest_start("Experimental")#ctest_update()set(CTEST_PROJECT_SUBPROJECTS
SportTest SampleTest InterceptTest)foreach(subproject
${CTEST_PROJECT_SUBPROJECTS})    set_property(GLOBAL PROPERTY SubProject
${subproject})    set_property(GLOBAL PROPERTY Label  ${subproject})
ctest_configure()    set(CTEST_BUILD_TARGET ${subproject})
ctest_build(APPEND)    ctest_test(INCLUDE_LABEL ${subproject})
ctest_coverage()    ctest_submit()endforeach()*
























*But after running I am getting following error:Performing coverage run
covsrc with
COVFILE=[/Users/rajekumar/work/test-codes/Test/out//CMake.cov]Cannot find
:covsrcerror running covsrc:Error running bullseye summary.   globbing for
coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/ALL_BUILD.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Continuous.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Experimental.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Nightly.dir   globbing
for coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/NightlyMemoryCheck.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/CMakeFiles/ZERO_CHECK.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/intercepttest1/CMakeFiles/intercepttest1.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/intercepttest2/CMakeFiles/intercepttest2.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/sporttest1/CMakeFiles/sporttest1.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/sporttest2/CMakeFiles/sporttest2.dir
globbing for coverage in:
/Users/rajekumar/work/test-codes/Test/out/test/CMakeFiles/Sample.dir Cannot
find any GCov coverage files. Cannot find any Python Trace.py coverage
files.Cannot find coverage.py XML file:
/Users/rajekumar/work/test-codes/Test/out/coverage.xml Cannot find foobar
GTM coverage file:
/Users/rajekumar/work/test-codes/Test/out/gtm_coverage.mcov Cannot find
Cache coverage file:
/Users/rajekumar/work/test-codes/Test/out/cache_coverage.cmcov Cannot find
any coverage files. Ignoring Coverage request.*

I was under the impression that I only need gcov & lcov for code coverage.

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

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140916/0353272d/attachment.html>


More information about the CMake mailing list