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

Re: Testing ext/ and lib/ in parallel

Thread Previous | Thread Next
From:
Bram
Date:
August 13, 2008 05:40
Subject:
Re: Testing ext/ and lib/ in parallel
Message ID:
20080813143943.tckhgidm8s8gs4kk@horde.wizbit.be
Citeren Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:

> 2008/8/13 Bram <p5p@perl.wizbit.be>:
>> 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.

Example:

ext/A/a1.t
ext/A/a2.t
ext/B/b1.t
ext/B/b2.t

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.

Correct.
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About