|
Boost : |
Subject: Re: [boost] More tests running with Boost.Test than registered
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-09-22 19:14:50
Jon Black <jon_black <at> fastmail.fm> writes:
> So I put a print statement in the test in each DLL and ran it again, and
You could have used --log_level=all to see what is being tested
> The project for MyDll1 depends on the other projects. That can't be a
> coincidence! I'm confused though, why is the console_test_runner
> executing tests in other DLL's when I've only specified MyDll1 on the
> command line? Each DLL has its own unit_test_init() function declared in
You probably are using automatically registered test units. These are registered
in single shared test framework as soon as you load these libraries and they are
loaded in memory as they are dependencies of the library you want to test. Thus
you end up with all test units in all loaded libraries.
You can specify the test case belonging to the Mydll1 using --run=TestMyDll1 and
you'll get only 1 test case being executed.
I think this is correct behavior overall. What you got here is implicit
dependency between test units you can't be sure TestMyDll1 working until you
tested all of it's dependent test cases which are in this case reside in
corresponding libraries.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk