[Cdash] Adding support for "Krazy" code checker to cdash ?
Alexander Neundorf
neundorf at kde.org
Mon Mar 29 19:05:21 UTC 2010
On Sunday 28 March 2010, 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.
Hmm, I'd like to have it appear like a build so the reported errors are
counted separately etc.
Basically more or less like the KWStyle build for cmake (the one just at the
top):
http://www.cdash.org/CDash/index.php?project=CMake
IOW how can I tweak the build step so that it calls krazy instead of actually
building the project.
Alex
More information about the CDash
mailing list