Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-11 22:17:58


"rclemley <rclemley_at_[hidden]>" <rclemley_at_[hidden]> writes:

> Hi,
>
> For unit testing we have unit test executables that
> are built using production libraries.
>
> The unit test executables create a file in the current
> working directory called "tests.passed" if successful.
> If unsuccessful, error messages are printed but no
> file is created and non-zero returned to the execution
> environment.
>
> I want to create a rule such that 'all' depends
> on 'tests.passed' and such that 'tests.passed' depends
> on the test executable which is built from the libraries.

No need to reinvent the wheel. I suggest you take advantage of the
testing rules in $BOOST_ROOT/tools/build/testing.jam, in particular
the "run" rule.

You can look at $BOOST_ROOT/status/Jamfile for examples of its use.

To get tests run as part of all, just add

DEPENDS all : test ;

to your Jamfile.

HTH,

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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