In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/934272c1a42c040b4bd39f09eb0eeced3388942e?hp=8f71649941d02d5bdfe4fed5054c505b12dd2c0e>

- Log -----------------------------------------------------------------
commit 934272c1a42c040b4bd39f09eb0eeced3388942e
Author: Karl Williamson <[email protected]>
Date:   Sat Feb 18 22:28:58 2017 -0700

    Split APItest/t/handy.t
    
    This is a very long running test.  This commit splits it into smaller
    chunks, based on the environment variable TEST_JOBS, up to 10.   Each
    chunk executes 1/TEST_JOBS of the total test.  If TEST_JOBS is not set,
    it reverts to 1 chunk.  The alternative would be to revert to 10, but
    since there is overhead associated with each new chunk, I chose, for
    now, 1.
    
    There may be a better solution later on, but I think this is good enough
    for now.
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST                                    | 12 +++++++++++-
 ext/XS-APItest/t/handy0.t                   |  7 +++++++
 ext/XS-APItest/t/handy1.t                   |  7 +++++++
 ext/XS-APItest/t/handy2.t                   |  7 +++++++
 ext/XS-APItest/t/handy3.t                   |  7 +++++++
 ext/XS-APItest/t/handy4.t                   |  7 +++++++
 ext/XS-APItest/t/handy5.t                   |  7 +++++++
 ext/XS-APItest/t/handy6.t                   |  7 +++++++
 ext/XS-APItest/t/handy7.t                   |  7 +++++++
 ext/XS-APItest/t/handy8.t                   |  7 +++++++
 ext/XS-APItest/t/handy9.t                   |  7 +++++++
 ext/XS-APItest/t/{handy.t => handy_base.pl} | 17 ++++++++++++++++-
 12 files changed, 97 insertions(+), 2 deletions(-)
 create mode 100644 ext/XS-APItest/t/handy0.t
 create mode 100644 ext/XS-APItest/t/handy1.t
 create mode 100644 ext/XS-APItest/t/handy2.t
 create mode 100644 ext/XS-APItest/t/handy3.t
 create mode 100644 ext/XS-APItest/t/handy4.t
 create mode 100644 ext/XS-APItest/t/handy5.t
 create mode 100644 ext/XS-APItest/t/handy6.t
 create mode 100644 ext/XS-APItest/t/handy7.t
 create mode 100644 ext/XS-APItest/t/handy8.t
 create mode 100644 ext/XS-APItest/t/handy9.t
 rename ext/XS-APItest/t/{handy.t => handy_base.pl} (97%)

diff --git a/MANIFEST b/MANIFEST
index 3552b60e0f..6ab8b2c597 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4228,7 +4228,17 @@ ext/XS-APItest/t/gv_fetchmeth.t          XS::APItest: 
tests for gv_fetchmeth() and varia
 ext/XS-APItest/t/gv_fetchmeth_autoload.t       XS::APItest: tests for 
gv_fetchmeth_autoload() and variants
 ext/XS-APItest/t/gv_fetchmethod_flags.t        XS::APItest: tests for 
gv_fetchmethod_flags() and variants
 ext/XS-APItest/t/gv_init.t     XS::APItest: tests for gv_init and variants
-ext/XS-APItest/t/handy.t       XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy0.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy1.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy2.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy3.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy4.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy5.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy6.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy7.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy8.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy9.t      XS::APItest: tests for handy.h
+ext/XS-APItest/t/handy_base.pl XS::APItest: tests for handy.h
 ext/XS-APItest/t/hash.t                XS::APItest: tests for hash related APIs
 ext/XS-APItest/t/join_with_space.t     test op_convert_list
 ext/XS-APItest/t/keyword_multiline.t   test keyword plugin parsing across lines
diff --git a/ext/XS-APItest/t/handy0.t b/ext/XS-APItest/t/handy0.t
new file mode 100644
index 0000000000..7c3e4e3e72
--- /dev/null
+++ b/ext/XS-APItest/t/handy0.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 0;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy1.t b/ext/XS-APItest/t/handy1.t
new file mode 100644
index 0000000000..2fd8ec1d21
--- /dev/null
+++ b/ext/XS-APItest/t/handy1.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 1;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy2.t b/ext/XS-APItest/t/handy2.t
new file mode 100644
index 0000000000..2d4e78d311
--- /dev/null
+++ b/ext/XS-APItest/t/handy2.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 2;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy3.t b/ext/XS-APItest/t/handy3.t
new file mode 100644
index 0000000000..fe07af3b64
--- /dev/null
+++ b/ext/XS-APItest/t/handy3.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 3;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy4.t b/ext/XS-APItest/t/handy4.t
new file mode 100644
index 0000000000..08977a1aa7
--- /dev/null
+++ b/ext/XS-APItest/t/handy4.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 4;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy5.t b/ext/XS-APItest/t/handy5.t
new file mode 100644
index 0000000000..d2bb9269bc
--- /dev/null
+++ b/ext/XS-APItest/t/handy5.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 5;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy6.t b/ext/XS-APItest/t/handy6.t
new file mode 100644
index 0000000000..44fd1c6346
--- /dev/null
+++ b/ext/XS-APItest/t/handy6.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 6;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy7.t b/ext/XS-APItest/t/handy7.t
new file mode 100644
index 0000000000..c6c2d5092a
--- /dev/null
+++ b/ext/XS-APItest/t/handy7.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 7;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy8.t b/ext/XS-APItest/t/handy8.t
new file mode 100644
index 0000000000..7e546d7371
--- /dev/null
+++ b/ext/XS-APItest/t/handy8.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 8;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy9.t b/ext/XS-APItest/t/handy9.t
new file mode 100644
index 0000000000..38d89c0c73
--- /dev/null
+++ b/ext/XS-APItest/t/handy9.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+no warnings 'once';
+
+$::TEST_CHUNK = 9;
+
+do './t/handy_base.pl';
diff --git a/ext/XS-APItest/t/handy.t b/ext/XS-APItest/t/handy_base.pl
similarity index 97%
rename from ext/XS-APItest/t/handy.t
rename to ext/XS-APItest/t/handy_base.pl
index 5ae97cdb21..676f7dfe6c 100644
--- a/ext/XS-APItest/t/handy.t
+++ b/ext/XS-APItest/t/handy_base.pl
@@ -166,7 +166,18 @@ my %utf8_param_code = (
                         "deprecated mathoms"    => -2,
                       );
 
+# This test is split into this number of files.
+my $num_test_files = $ENV{TEST_JOBS} || 1;
+$num_test_files = 10 if $num_test_files > 10;
+
+my $property_count = -1;
 foreach my $name (sort keys %properties, 'octal') {
+
+    # We test every nth property in this run so that this test is split into
+    # smaller chunks to minimize test suite elapsed time when run in parallel.
+    $property_count++;
+    next if $property_count % $num_test_files != $::TEST_CHUNK;
+
     my @invlist;
     if ($name eq 'octal') {
         # Hand-roll an inversion list with 0-7 in it and nothing else.
@@ -389,8 +400,12 @@ my %to_properties = (
                 UPPER => 'Uppercase_Mapping',
             );
 
-
+$property_count = -1;
 foreach my $name (sort keys %to_properties) {
+
+    $property_count++;
+    next if $property_count % $num_test_files != $::TEST_CHUNK;
+
     my $property = $to_properties{$name};
     my ($list_ref, $map_ref, $format, $missing)
                                       = prop_invmap($property, );

--
Perl5 Master Repository

Reply via email to