Re: [boost] More tests running with Boost.Test than registered

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 Thanks. That's much nicer.
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. Yes, they are automatically registered tests. In the init_unit_test() method I also give the master test suite a unique name for each DLL. If
On 23-9-2011 7:42, boost-request@lists.boost.org wrote: there is on shared test framework, does this mean I'm just renaming the same master test suite each time?
You can specify the test case belonging to the Mydll1 using --run=TestMyDll1 and you'll get only 1 test case being executed. Perfect! I've used run_test to limit to a test suite which I've auto registered per project. 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. Agreed. I'm running it as a post build step. Adding the run_test option to limit what is executed solves my problem. Thanks. Gennadiy

Jon Black <jon_black <at> mm.st> writes:
Yes, they are automatically registered tests. In the init_unit_test() method I also give the master test suite a unique name for each DLL. If there is on shared test framework, does this mean I'm just renaming the same master test suite each time?
Yes, but you should get the correct name since MyDll1 is loaded in memory last. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Jon Black