From ec0e1348273eccf3e1dd567dccca214ca2a1fec7 Mon Sep 17 00:00:00 2001 From: Peter Martini Date: Sat, 11 Apr 2015 14:25:21 -0700 Subject: [PATCH] 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. --- generate.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/generate.pl b/generate.pl index 78f0183..cfc0c67 100755 --- a/generate.pl +++ b/generate.pl @@ -68,6 +68,14 @@ for my $release (@{$yaml->{releases}}) { $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"; print $dockerfile $output; close $dockerfile; @@ -132,7 +140,7 @@ RUN curl -SL https://cpan.metacpan.org/authors/id/{{pause}}/perl-{{version}}.tar && {{apply_patches}} \ && ./Configure {{args}} {{extra_flags}} -des \ && make -j$(nproc) \ - && TEST_JOBS=$(nproc) make test_harness \ + && {{test}} \ && make install \ && cd /usr/src \ && curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \