
Hi folks, As mentioned in thread below, test cases on boost.test may be being run based on static initialization. However, we are seeing them run in different order with each new link- perhaps because Microsoft is intentionally changing the way things fall in memory? In the past I had created a test framework with auto-registration. In that framework, at static initialization time, objects registered themselves with a global parent object that had a container that was alphabetically sorted. Tests always ran in the same order, even if files were moved around in the project or makefile. At this point my tests aren't even running the same way when I recompile the same cpp file (there is only one cpp file in this test). I guess I'm down to two questions: 1) does this sound like a good feature request, and if so how do I file it? 2) for now what's the shortest path to what I want while retaining auto-registration. Thanks, Greg
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: Tuesday, October 13, 2009 8:16 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Boost.Test] [1.38] --random runtime parameter
AMDG
Greg Christopher wrote:
I am wondering what "non random" means (--random-0).
We are seeing the test framework behave such that with --random-0, it seems to do the tests in an order and stick with that order, but I'm not sure how it's deciding the order. If we re-link the test program, it seems to do them in a different order.
I would like to figure out how to make this deterministic without
losing the benefit of not having to create my own test execution driver. I would think that non random would be in alphabetical order of test_case_name (we are doing auto registration) but that's not what we're seeing. Non-random seems to indicate maybe some kind of static initialization order, which is random.
You are correct that the order is effectively the static initialization order. This is not completely random. Test cases in the same translation unit should be executed in order.
In Christ, Steven Watanabe
P.S. Please start a new thread instead of replying to an existing thread.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users