Boost logo

Boost-Build :

Subject: [Boost-build] allowing targets to fail
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2017-03-24 19:00:04


the bjam C code presently allows for actions to fail if the "xfail" flag
is set. This means that actions are either expected to pass (default) or
fail (if the xfail flag is set). `b2` will report an error if it wasn't
able to rebuild any targets.

How does that map to tests, which may pass or fail (at various stages of
the process) ? Is there a way to indicate to b2 that a (test) target may
fail to be built or be run ? And similarly, is it possible to still
collect the status of these tests so a proper test report can be generated ?

Consider for example a dependency graph where D depends on C depends on
B depends on A. A and B are ordinary (file) targets, but C and D are
'test targets' (for example, C may compile a test, and D may run it).
How could I allow C or D to fail (i.e. tell b2 not to generate an error
message), but still record the error for a later report generation step
? In addition, how could I write another target E that should only be
run after all the others, but without depending on the tests having run
successfully ?



      ...ich hab' noch einen Koffer in Berlin...

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at