TestCocoon support for KDE build system

Stephen Kelly steveire at gmail.com
Sat Aug 27 15:11:18 UTC 2011


Stephen Kelly wrote:

> Sébastien Fricker wrote:
> 
>> Hi,
>> I guessing if there are some interests to integrate a support of
>> TestCocoon into the KDE build system.
>> 
>> TestCocoon is an open source code coverage tool which includes a
>> graphical interface and which instrument C++ applications up to the
>> decision/condition level.
>> TestCocoon would permit to collect the coverage information of the unit
>> test of the KDE project but also from each beta tester. This would give
>> a better overview of the test quality. Also it is possible to work on
>> differences between two releases, this permits to check if a hot fix is
>> correctly tested.
>> 
>> The integration into the build system should not be very difficult:
>> see http://testcocoon.org/coveragescanner.html#toc66 for an example of a
>> CMake configuration.
>> 
>> I could start myself to work on a patch, but I need first to get
>> familiar with the complete KDE build system. So I looking for somebody
>> which works with me on this implementation.
>> 
> 
> That seems interesting. I'm sure we would be happy for better support for
> it.
> 
> I've just tried it with grantlee
> (https://www.gitorious.org/grantlee/grantlee) and could not get it to
> work:

Just adding git diff output too.

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ca379f..87cbcc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ include(GrantleeGenerateExportHeader)
 set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} Coverage )
 if (${CMAKE_VERSION} VERSION_GREATER 2.8.2)
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
-                "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage")
+                "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage" 
"TestCocoon")
 endif()
 set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -
ftest-coverage")
 set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_RELEASE} -fprofile-arcs -ftest-
coverage")
@@ -42,6 +42,12 @@ set(CMAKE_EXE_LINKER_FLAGS_COVERAGE 
"${CMAKE_EXE_LINKER_FLAGS_RELEASE} -fprofile
 set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE 
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
 set(CMAKE_STATIC_LINKER_FLAGS_COVERAGE 
"${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
 
+set(CMAKE_CXX_FLAGS_TESTCOCOON "${CMAKE_CXX_FLAGS_DEBUG} --cs-on --cs-count 
--cs-qt4")
+set(CMAKE_C_FLAGS_TESTCOCOON "${CMAKE_C_FLAGS_DEBUG} --cs-on --cs-count --
cs-qt4")
+set(CMAKE_EXE_LINKER_FLAGS_TESTCOCOON "${CMAKE_EXE_LINKER_FLAGS} --cs-on --
cs-count --cs-qt4")
+set(CMAKE_SHARED_LINKER_FLAGS_TESTCOCOON 
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE} --cs-on --cs-count --cs-qt4")
+set(CMAKE_STATIC_LINKER_FLAGS_TESTCOCOON 
"${CMAKE_STATIC_LINKER_FLAGS_RELEASE} --cs-on --cs-count --cs-qt4")
+
 if (CMAKE_COMPILER_IS_GNUCXX)




More information about the Kde-buildsystem mailing list