# New Ticket Created by  Eric Wilhelm 
# Please include the string:  [perl #57358]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57358 >


Hi,

The attached patch allows testing of parrot to be parallelized via 
setting an environment variable (or using make to do so)

  make test TEST_JOBS=4

This is a very simple patch and more work needs to be done to keep the 
tests from using resources which conflict with each other.

This doesn't attempt to cover various other forms of 'make test*' and 
assorted optional testing features which could be parallelized.  It 
also doesn't deal with any of the languages.  The reason is that every 
language has its own t/harness file.

Some simple find+replace could potentially make each of those use 
Parrot::Test::Harness.

You will need to install TAP::Harness to test in parallel.  With 2 
cores, I'm seeing the following results:

  9 jobs:
    126 wallclock secs
    ( 4.17 usr  1.25 sys + 186.11 cusr 44.59 csys = 236.12 CPU)

  3 jobs:
    142 wallclock secs
    ( 4.83 usr  1.00 sys + 185.48 cusr 44.26 csys = 235.57 CPU)

  1 job:
    275 wallclock secs
    ( 3.87 usr  0.86 sys + 181.55 cusr 44.32 csys = 230.60 CPU)

Thanks,
Eric
Index: t/harness
===================================================================
--- t/harness	(revision 29822)
+++ t/harness	(working copy)
@@ -107,7 +107,9 @@
             exit;
         } else {
             $harness = TAP::Harness->new({
-                verbosity => $ENV{HARNESS_VERBOSE}, merge => 0
+                verbosity => $ENV{HARNESS_VERBOSE},
+                merge     => 0,
+                jobs      => $ENV{TEST_JOBS} || 1,
             });
         }
         $harness->runtests(@tests);

Reply via email to