[Cdash] Adding support for "Krazy" code checker to cdash ?
Eric Noulard
eric.noulard at gmail.com
Sun Mar 28 18:10:52 UTC 2010
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 :-)
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CDash
mailing list