Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test]
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-05-12 23:42:04

Tim Day wrote:
> If I grep my /usr/include/boost/test (I'm still on 1.35) for "depend"
> then I'm intrigued to see there appears to be some sort of support for
> declaring dependencies between tests (which would presumably influence
> the order)

No. Not at the moment. If you believe this needs t obe fixed please
submit bug report.

> e.g in unit_test_suite_impl.hpp test_unit has a depends_on
> method taking (a pointer to) another test_unit as an argument. I
> haven't tried doing anything with it though. Would be interested to
> know more... it doesn't seem to be documented.

Essentially it's single method in test_unit:

void depends_on( test_unit* tu );

> I can sympathise with wanting to run tests in a specific order. I
> generally like to run the quick (typically low level) ones first, and
> leave the slow ones until later. My preferred solution is to maintain
> two test executables; one with the tests quick enough to be run after
> every compile, the other (which might take some 10s of seconds) is
> better run on demand (after making big changes, before commits).

You can maintain one executable and select est cases to run with command
line parameter. For example:

test_module.exe --run=*/basic_test

only executes test cases named basic_test in all test suites


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at