Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] [1.38] Need way to have auto-registered tests remain consistant...
From: Greg Christopher (gchristopher_at_[hidden])
Date: 2009-10-16 14:40:55


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_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Steven Watanabe
> Sent: Tuesday, October 13, 2009 8:16 PM
> To: boost-users_at_[hidden]
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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