Boost logo

Boost-Build :

Subject: Re: [Boost-build] Using bjam testing rules, and boost.test with CI systems
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2010-05-19 03:11:00


Anthony Foglia wrote:
> I'm setting up a continuous integration system (Hudson) for our code
> base. It can parse the xml output from boost test. The problem is,
> when I run the boost test code from the boost.build "run" rule, it
> appends an "EXIT STATUS: 0" line after the XML, which causes the
> parser to fail. Is there a way to tell run to preserve the only the
> executable output, without the exit status line?

I've been using Hudson + Boost.Test for quite some time now.

IIUC you're redirecting standard output to a file, and use that file as
input to the xUnit/Boost.Test plugin. I suggest that you instead explicitly
configure Boost.Test to write the test log to file in one of the following
ways:

- Redirect the log output stream in your code using global fixtures. See
http://www.boost.org/doc/libs/1_43_0/libs/test/doc/html/utf/user-guide/test-output/log-ct-config.html
to get started. You'll need some way of communicating the output file name
to the test executable, but that's doable.

- Add the command-line option "--log_sink=<path to file>" as an argument to
the test driver. Caveat: only supported lately IIRC, haven't tried it
myself.

Regards / Johan


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk