summaryrefslogtreecommitdiff
path: root/lib/unicore
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-02-19 22:03:27 -0700
committerKarl Williamson <khw@cpan.org>2017-02-19 22:45:00 -0700
commit90400c5ccdc60c7f577dad31d06aa388ee118a28 (patch)
treec74030528dfd2691da767e4e89bdf766289aaf03 /lib/unicore
parentec2c235b8da47c613eb6c9cdac160311692ea63a (diff)
downloadperl-90400c5ccdc60c7f577dad31d06aa388ee118a28.tar.gz
Balance uniprops tests
Commit 5656b1f654bb034c561558968ed3cf87a737b3e1 split the tests generated by mktables so that 10 separate files each execute 10% of the tests. But it turns out that some tests are much more involved than others, so that some of those 10 files still took much longer than average. This commit changes the split so that the amount of time each file takes is more balanced. It uses a natural breaking spot for the tests for the \b{} flavors, except that GCB and SB are each short (so are combined into being tested from one file), and LB is very long, so is split into 4 test groups.
Diffstat (limited to 'lib/unicore')
-rw-r--r--lib/unicore/mktables45
1 files changed, 35 insertions, 10 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 542461742d..e3336f50e0 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -18835,31 +18835,56 @@ EOF_CODE
? "\nsub TODO_FAILING_BREAKS { 1 }\n"
: "\nsub TODO_FAILING_BREAKS { 0 }\n";
-
- push @output,
- (map {"Test_GCB('$_');\n"} @backslash_X_tests),
- (map {"Test_LB('$_');\n"} @LB_tests),
- (map {"Test_SB('$_');\n"} @SB_tests),
- (map {"Test_WB('$_');\n"} @WB_tests);
-
@output= map {
map s/^/ /mgr,
map "$_;\n",
split /;\n/, $_
} @output;
+ # Cause there to be 'if' statements to only execute a portion of this
+ # long-running test each time, so that we can have a bunch of .t's running
+ # in parallel
+ my $chunks = 10 # Number of test files
+ - 1 # For GCB & SB
+ - 1 # For WB
+ - 4; # LB split into this many files
my @output_chunked;
my $chunk_count=0;
- my $chunk_size= int(@output/10)+1;
+ my $chunk_size= int(@output / $chunks) + 1;
while (@output) {
$chunk_count++;
my @chunk= splice @output, 0, $chunk_size;
push @output_chunked,
- "if (!\$::TESTCHUNK or \$::TESTCHUNK == $chunk_count){\n",
- @chunk,
+ "if (!\$::TESTCHUNK or \$::TESTCHUNK == $chunk_count) {\n",
+ @chunk,
+ "}\n";
+ }
+
+ $chunk_count++;
+ push @output_chunked,
+ "if (!\$::TESTCHUNK or \$::TESTCHUNK == $chunk_count) {\n",
+ (map {" Test_GCB('$_');\n"} @backslash_X_tests),
+ (map {" Test_SB('$_');\n"} @SB_tests),
+ "}\n";
+
+
+ $chunk_size= int(@LB_tests / 4) + 1;
+ @LB_tests = map {" Test_LB('$_');\n"} @LB_tests;
+ while (@LB_tests) {
+ $chunk_count++;
+ my @chunk= splice @LB_tests, 0, $chunk_size;
+ push @output_chunked,
+ "if (!\$::TESTCHUNK or \$::TESTCHUNK == $chunk_count) {\n",
+ @chunk,
"}\n";
}
+ $chunk_count++;
+ push @output_chunked,
+ "if (!\$::TESTCHUNK or \$::TESTCHUNK == $chunk_count) {\n",
+ (map {" Test_WB('$_');\n"} @WB_tests),
+ "}\n";
+
&write($t_path,
0, # Not utf8;
[$HEADER,