Boost logo

Boost-Build :

Subject: Re: [Boost-build] Leave target on failure?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-12-23 12:53:59


On Monday 07 December 2009 13:25:31 Johan Nilsson wrote:

> Hi,
>
> I've discovered a "minor" design flaw in my NUnit generator under
> development (same as previously discussed here).
>
> The generator generates two main outputs (if XML output is activated):
>
> - The "target name".nunit file, used to detect if the tests are up-to-date
> and were run successfully.
> - The XML report, used to store details on tests run and their success.
>
> Now, when one or more of the tests fail at runtime, the XML report is
> deleted as well - which is obviously not what I'd like. What would be the
> best design for allowing to leave the XML report behind, if:
>
> 1. The tests are actually run (no problems with e.g. the test runner not
> being able to find or load the shared libraries containing the tests, or
> their runtime dependencies).
> 2. One or more of the tests fail at runtime (the test runner then exits with
> a non-zero status code).
>
> If (1) above fails, i.e. there is a problem with the actual runner
> execution, I think the XML report should get deleted as no tests were
> actually created.
>
> Any comments / design suggestions?

I have looked at the build engine code and now at least capable of asking semi-intelligent
questions.

I think I can implement, inside bjam, a mechanism to leave a given target even
if the action to update it fails -- so this should help with leaving XML report
if the runner returns non-zero exit status. That's not exactly the behaviour you
want.

To implement the behaviour you want, how can we distinguish between cases (1)
and (2) above? Does runner return different error codes? Or there's some other
approach?

- Volodya


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