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.
This commit is contained in:
Peter Martini 2015-04-11 14:25:21 -07:00
parent 808a689179
commit ec0e134827

View file

@ -68,6 +68,14 @@ for my $release (@{$yaml->{releases}}) {
$output =~ s/.*{{apply_patches}}.*\n//mg; $output =~ s/.*{{apply_patches}}.*\n//mg;
} }
if (defined $release->{test_parallel} && $release->{test_parallel} eq "no") {
$output =~ s/{{test}}/make test_harness/;
} elsif (!defined $release->{test_parallel} || $release->{test_parallel} eq "yes") {
$output =~ s/{{test}}/TEST_JOBS=\$(nproc) make test_harness/;
} else {
die "test_parallel was provided for $release->{version} but is invalid; should be 'yes' or 'no'\n";
}
open my $dockerfile, ">$dir/Dockerfile" or die "Couldn't open $dir/Dockerfile for writing"; open my $dockerfile, ">$dir/Dockerfile" or die "Couldn't open $dir/Dockerfile for writing";
print $dockerfile $output; print $dockerfile $output;
close $dockerfile; close $dockerfile;
@ -132,7 +140,7 @@ RUN curl -SL https://cpan.metacpan.org/authors/id/{{pause}}/perl-{{version}}.tar
&& {{apply_patches}} \ && {{apply_patches}} \
&& ./Configure {{args}} {{extra_flags}} -des \ && ./Configure {{args}} {{extra_flags}} -des \
&& make -j$(nproc) \ && make -j$(nproc) \
&& TEST_JOBS=$(nproc) make test_harness \ && {{test}} \
&& make install \ && make install \
&& cd /usr/src \ && cd /usr/src \
&& curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \ && curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \