Skip to content

Commit ec0e134

Browse files
committed
Allow Releases.yaml to disable parallel testing
Perl 5.16.3 is sporadically failing the dist/IO/t/io_unix.t on my mention when run with TEST_JOBS > 1, but consistently passes without that. Adding a flag to Releases.yaml to allow this to be coordinated properly.
1 parent 808a689 commit ec0e134

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

generate.pl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ sub die_with_sample {
6868
$output =~ s/.*{{apply_patches}}.*\n//mg;
6969
}
7070

71+
if (defined $release->{test_parallel} && $release->{test_parallel} eq "no") {
72+
$output =~ s/{{test}}/make test_harness/;
73+
} elsif (!defined $release->{test_parallel} || $release->{test_parallel} eq "yes") {
74+
$output =~ s/{{test}}/TEST_JOBS=\$(nproc) make test_harness/;
75+
} else {
76+
die "test_parallel was provided for $release->{version} but is invalid; should be 'yes' or 'no'\n";
77+
}
78+
7179
open my $dockerfile, ">$dir/Dockerfile" or die "Couldn't open $dir/Dockerfile for writing";
7280
print $dockerfile $output;
7381
close $dockerfile;
@@ -132,7 +140,7 @@ =head1 DESCRIPTION
132140
&& {{apply_patches}} \
133141
&& ./Configure {{args}} {{extra_flags}} -des \
134142
&& make -j$(nproc) \
135-
&& TEST_JOBS=$(nproc) make test_harness \
143+
&& {{test}} \
136144
&& make install \
137145
&& cd /usr/src \
138146
&& curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \

0 commit comments

Comments
 (0)