[CMake] best way of parsing test results from ctest + valgrind

Dave Flogeras dflogeras2 at gmail.com
Wed Mar 2 05:19:46 EST 2016


On Tue, Mar 1, 2016 at 8:15 PM, Aaron Boxer <boxerab at gmail.com> wrote:
> Hello,
> I am just getting started on using valgrind memory analysis for my tests.
> When I run ctest with nightly memory check, I get an XML document, but it
> is very hard to read the results. What is the best way of reading this doc?
>

For me, the best way to go was to go through the short-term pain of
setting up CDash (it is not very hard, but you do have to set up a
database, a webserver and PHP).  Also, you only set it up once and you
can host as many projects on your server as you like.

Once that is done, create a project in CDash and it will generate you
a CTestConfig.cmake which you drop into your CMake project. Then it is
as easy as "make NightlySubmit" (after
NightlyStart/Configure/Build/Test etc.).  It handles uploading the xml
to CDash and CDash will parse it and build you nice tables to
summarize.  Clicking into individual tests will show you their
results.

If you like, you can then go further and use a tool like python to
script and automate your clone/configure/build/test/upload process
across multiple projects/multiple variations.  I do this on multiple
hosts so that CDash aggregates the results of building multiple
projects, with multiple compilers, on multiple operating systems.  It
all depends what you need.

That may not be the easiest solution, but I think it is a good one and
worth looking into.

HTH
Dave


More information about the CMake mailing list