Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-18 01:21:13

On Sunday 17 April 2005 22:32, Brian Riis wrote:

> > Would be nice if some one else could explain why you would ever use run
> > as opposed to unit-test.
> Well, now you pointed me in the right direction, I took a look at those
> rules, and run is quite different from unit-test in invocation. This
> actually means that run is more powerful, since you can pass arguments
> to the command to run. For simple unit tests that require no arguments
> and simply indicate success or failure by return code unit-test is
> simpler to use.

There's another important difference between 'unit-test' and 'run'. The 'run'
rule is meant to work with Boost's regression testing system. It captures the
program output, and creates some additional files. So, if you'll use 'run'
outside of Boost regression system, any test failure will produce a lot of
strange output, and store the actual output from the test in a file. OTOH,
with unit-test, you'll see program output, followed by the "failed" message.
So, for humans, 'unit-test' might be more convenient.

- Volodya

Vladimir Prus
Boost.Build V2:

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