Boost logo

Boost-Build :

Subject: Re: [Boost-build] Leave target on failure?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-03-04 18:06:12


On Tuesday 16 February 2010 10:19:09 Johan Nilsson wrote:

> Ping?
>
> Johan Nilsson wrote:
> > Vladimir Prus wrote:
> >> On Monday 07 December 2009 13:25:31 Johan Nilsson wrote:
> >>

> >>> 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).

> > Coming back to this problem after some time. I've checked the source
> > code
> > for the test runner and it seems like:
> >
> > - A negative status code is set if (1) occurs.
> > - A positive status code, corresponding to the no of failing tests,
> > is set
> > if (2) occurs.
> >
> > Does this help?

I've tried to address this in small steps, and checked in a new builtin,
PRECIOUS, that prevents removal of a target when update fails.
See:

        https://svn.boost.org/trac/boost/changeset/60157

Does this help at least half-way? If it mostly works, I'll implement an indirection
to decide if to retain target based on exit code.

Thanks,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

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