develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Testing ext/ and lib/ in parallel

Thread Previous | Thread Next
August 13, 2008 05:40
Re: Testing ext/ and lib/ in parallel
Message ID:
Citeren Rafael Garcia-Suarez <>:

> 2008/8/13 Bram <>:
>> Currently the directories in ext/ and lib/ run in parallel but the test in
>> each dir run in sequence. (Thanks to Nicholas of course)

I see that I left too much room for minsterpretation :(

What I meant to say was that each subdirectory inside ext/ and lib/  
run in parallel.

That is, the directories ext/A and ext/B are run at the same time but  
the tests in ext/A and ext/B are run in sequence.



The first job will take ext/A, starting with ext/A/a1.t and when  
finished move on to ext/A/a2.t

The second job will take ext/B, starting with ext/B/b1.t and when  
finished move on to ext/B/b2.t

>> At the moment some tests in ext/ and lib/ are not parallel-safe, but some
>> are...
>> What would be a good way to mark the parallel-safe ones?
>> This also to allow chaning the tests one by one instead of all at once which
>> might not be possible. (since it would be best to keep everything in sync
>> with CPAN (IMHO))
>> What I've been thinking about:
>> - a .parallel file in the directories that are parallel safe
>> - adding the list of safe modules in t/harness
>> - creating another file that holds the list
>> - ...
> I'm under the impression that those are suboptimal. We can consider
> two levels of parallelism:
> * run the list of tests of module A and the list of tests of module B
> in parallel: this should be mostly always possible, I suppose?

This is what it currently does.

> * run in parallel all tests of module A: this should be enabled (or
> disabled) on a per-module basis, since some test suites require to be
> run sequentially.

My question was how/where to enable/disable this?

The speedup that can be gained by running all tests in parallel might  
not be enormous but there should be one.

When running the tests in parallel I see at the end a slowdown with  
the tests in lib/Memoize/.
That is, one job is running and still needs to run several tests  
scripts while all others jobs are doing nothing (because the only  
tests left to run are the ones in lib/Memoize/).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About