Re: " it is still possible that all tcs in this suite can be run in parallel. May be some sort of work stealing algorithm ", that reminds me of something already built by Intel in Intel's Threading Building Blocks library. There is an open source version of it, but it scales well with increasing numbers of cores; and it is designed and implemented in such a way that the programmer does not need to worry about the tedious details of creating threads. I have examined it only for number crunching, but I don't see a reason it couldn't be used in designing and implementing test suites. It does, though, need a slight thift in mindset relative to what you'd normally do in multithreaded programs or conventional numeric algorithms (something you can see only by actually playing with it to do trivially simple things fast, like matrix multiplication). Instead, for example, of putting a lock around output, you'd design the program to use a class that collects the results of the tests, and then outputs it in a sensible order to some stram (standard out or a file stream). It might be worth a look (by programmers smarter than me), to see if it can hep in the context of this discussion, and to what extent.
Cheers
Ted
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: June-10-11 6:31 AM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [Test] can tests be run in parallel?
On Fri, Jun 10, 2011 at 11:13 AM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
Den 10-06-2011 00:07, Gennadiy Rozental skrev:
[...]
Thanks for the clarification. I really think this could be very useful.
I also think a very simple solution would suffice: simply run each test suite in parallel, and put a lock around the output such that the entire
output of a test suite (or test case) is printed at the end of the test suite (or test case).
regards
Thorsten
I think there is much more to do, since test suites might depend on other test cases or test suites. There must be some sort of logic, how to identify independent execution units and execute them, because even if some suite cannot be run in parallel since it depends on other suite(s) or test cases, it is still possible that all tcs in this suite can be run in parallel. May be some sort of work stealing algorithm?