[Cdash] Adding support for "Krazy" code checker to cdash ?

David Cole david.cole at kitware.com
Tue Mar 30 13:33:02 UTC 2010


The easiest way is probably:

- Set CTEST_BUILD_COMMAND to the command line that should be executed as the
build step.

- Use a CTestCustom.ctest to set CTEST_CUSTOM_WARNING_MATCH
and/or CTEST_CUSTOM_ERROR_MATCH to lists of regular expressions that match
the output of krazy.


The second easiest way is to do what kwstyle does and write your own
Build.xml that describe the errors and warnings precisely as you want.

I'd answer more thoroughly, but at this point, for me, it's a code-analysis
job depending on which route you take. (The knowledge is not just in my
head/easily accessible, I'd have to go derive it from the source...) Since
these are all open source things, you can do that just as easily as I can.


HTH,
David


On Mon, Mar 29, 2010 at 3:05 PM, Alexander Neundorf <neundorf at kde.org>wrote:

> 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
> _______________________________________________
> Cdash mailing list
> Cdash at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/cdash
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20100330/9737a0f4/attachment-0002.htm>


More information about the CDash mailing list