Boost Users :
Subject: Re: [Boost-users] [Boost.Test]
From: Tim Day (timday_at_[hidden])
Date: 2009-05-12 03:50:33
On Sun, 2009-05-10 at 18:50 +0200, Ruediger Berlich wrote:
> However, there must be some component in Boost.Test which chooses in which
> order tests are executed. It does not appear to be the linking order (I
> have tried that). Hence I was just wondering whether ther was an easy way
> to influence the execution order (which would then save me a few hours).
> Alphabetic order ?
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) 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.
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).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net