[Cdash] Adding support for "Krazy" code checker to cdash ?
Ryan Pavlik
rpavlik at iastate.edu
Sun Mar 28 18:40:16 UTC 2010
On 3/28/10 1:10 PM, Eric Noulard wrote:
> 2010/3/28 Alexander Neundorf<neundorf at kde.org>:
>
>> Hi,
>>
>> in KDE we have a tool called "krazy" which does some checks on our code
>> (http://techbase.kde.org/Development/Tutorials/Code_Checking). The results
>> can currently be seen at
>> http://www.englishbreakfastnetwork.org/krazy/index.php?component=kde-4.x
>>
>> It would be nice if krazy could be used also together with cdash, i.e. so that
>> the problems reported by krazy appear the same way as e.g. compiler warnings.
>>
>> So, I've got two questions:
>>
>> 1) how would I integrate krazy-checks into a nightly build ?
>> My nightly-script basically does:
>>
>> ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
>> ctest_start(Nightly)
>> ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" )
>> ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE ret)
>> ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE ret)
>> ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )
>> ctest_submit()
>>
>> Where would krazy come into play ?
>> krazy can be executed like this: $ krazy2all<dir>
>> and then it will check all files it finds in the directory<dir> and below.
>> Where/how would I add this call into the nightly-script ?
>>
> Since add_test may takes **any** test driver as a command
> you want I would personnally do something like
>
> find_program(KRAZY_EXECUTABLE NAMES krazy2all)
>
> set(KRAZY_PARTXXX_ARG ${CMAKE_SOURCE_DIR}/src/krazyou)
>
> add_test(NAME KrazyPartXXX
> COMMAND ${KRAZY_EXECUTABLE} ${KRAZY_PARTXXX_ARG})
>
> I think you get the idea, this along with some scripting you may have
> as many "karzy" test as you want.
>
> If you do not want all the krazy tests to run each time I bet some people
> here will explain you better than I can how to filter out what you don't want
> using ctest scripting.
>
>
>
>> 2) What is necessary so that cdash can recognize the reported errors in krazy
>> output ?
>>
> For that one I don't know, I'll pass :-)
>
>
See "FAIL_REGULAR_EXPRESSION" here:
http://cmake.org/cmake/help/cmake-2-8-docs.html#section_Properties%20on%20Tests
Ryan
--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
rpavlik at iastate.edu
http://academic.cleardefinition.com/
More information about the CDash
mailing list