You may try use Google Test's support for test sharding (http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Distributing_Test_Functions_to_Multiple_Machines).
Regards,
Vlad
Instead of making the death test mechanism more complex (it's already
quite complex as is), I'd suggest you write a simple test runner that:
1. runs the test executable with --gtest_list_tests to get a list of all TESTs.
2. runs the test executable with --gtest_filter=FooTest.Bar to invoke
only one TEST at one time.
You only need to write such a runner script once, and it shouldn't be
hard. Your test logic can stay simple.
Or, you might be able to use CMake's support for this, as Andrew Melo
suggested. I haven't tried that myself though.
--
Zhanyong
Do you really need that? You already have multiple test reports
anyway (one for each test executable), unless you only have one test
executable, which is unlikely.
> - Randomizing the order of tests
This doesn't add any value when you run different TESTs in different
processes and sequentially.
> - Repeating tests
You already said that your TESTs cannot clean up after themselves
properly, so repeating them doesn't make much sense. And if you
really want to, you can still use --gtest_repeat with --gtest_filter.
> - ...etc
>
> - If tests are invoked individually then:
> - The global environment gets set-up and torn-down each time
> - The test fixture gets set-up and torn-down each time
True. But the same is true if you use death tests. On Windows, when
EXPECT_DEATH(blah, ...) runs, it cannot magically jump to where blah
is in the child process. Instead, the child process has to run from
beginning, including setting the global environment and the test
fixture.
--
Zhanyong