2013/5/2 brian d foy <brian.d....@gmail.com> > In HARNESS_OPTIONS we can set -jN to note we want parallel tests > running, but how can a particular module, which might be buried in the > dependency chain, tell the harness it can't do that? > > It seems to me that by the time the tests are running, it's too late > because they are already in parallel and the best we can do is issue a > warning or decide to fail.
Note that Test::Synchronized may be a solution to your problem. For a more general solution a simple way to do it would be to let harness know that some tests must not be run in parallel by their file path. Something like storing those tests in a particular place such as "t/non-parallel/" that harness would exclude from parralel testing and would run sequentially after all the parallel tests. A related question is: do we want the tests to be explicitely aware at runtime that some others tests may be running in parallel (or in the opposite, that they are running in an exclusive mode)? That would give more information to Test::Is/Test::DescribeMe, but I don't think that would be a good idea. Non-parallel tests must stay the exception. Olivier.