Skip Menu |
 

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 77238
Status: open
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 3.23
Fixed in: (no value)



Subject: wish: support partial parallel runs
Download (untitled) / with headers
text/plain 488b
I have a large slow test suite with 20,000 tests. I'd like to run my tests in parallel, but some are not prepared to run that way. I would like an option to run some tests in parallel, without running all of them in parallel. For example, something in in the name or a "Smart Comment" might be used to mark tests as parallel-ready or not-parallel- ready. I thought this feature might be useful to other people, so I'm recording the idea as a wishlist item here. Thanks! Mark
Download (untitled) / with headers
text/plain 921b
On Wed May 16 10:45:21 2012, MARKSTOS wrote: Show quoted text
> I have a large slow test suite with 20,000 tests. I'd like to run my > tests in parallel, but some are not prepared to run that way. > > I would like an option to run some tests in parallel, without running all > of them in parallel. For example, something in in the name or a "Smart > Comment" might be used to mark tests as parallel-ready or not-parallel- > ready. > > I thought this feature might be useful to other people, so I'm recording > the idea as a wishlist item here.
I've done some further research on this, and made some notes here about how `prove` might be patched to support this feature: http://stackoverflow.com/questions/11977015/how-to-run-some-but-not-all-tests-in-a- perl-test-suite-in-parallel/11977495#11977495 I may end up working on this patch myself, since it wouldn't be much more effort than coding a one-off solution for myself.
Download (untitled) / with headers
text/plain 944b
On 2012-05-16 10:45:21, MARKSTOS wrote: Show quoted text
> I have a large slow test suite with 20,000 tests. I'd like to run my > tests in parallel, but some are not prepared to run that way. > > I would like an option to run some tests in parallel, without running all > of them in parallel. For example, something in in the name or a "Smart > Comment" might be used to mark tests as parallel-ready or not-parallel- > ready. > > I thought this feature might be useful to other people, so I'm recording > the idea as a wishlist item here.
A possible workaround which works with existing prove and Test-Harness: use exclusive locks. All test scripts which should not run at the same time can have something like open my $lockfh, ">", "test.lck" or die $!; fcntl $lockfh, LOCK_EX or die $!; before the critical section. Of course, one has to be careful when using locks, as it's possible to create deadlock situations... Regards, Slaven
Download (untitled) / with headers
text/plain 267b
LOCK_EX without LOCK_NB and prove do not mix well, at least with current implementation. If you want to use LOCK_EX you must pair it with LOCK_NB and keep writing "#\n" or so similar to what has been described at https://github.com/dbsrgits/dbix-class/commit/39568b8


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.