for m in \
ExtUtils::MakeMaker \
ExtUtils::CBuilder \
-R/RS/RSAVAGE/Tree-DAG_Node-1.13.tgz \
Module::Build \
-E/ET/ETHER/Class-Method-Modifiers-2.04.tar.gz \
; do
run_or_err "Pre-installing $m" "cpan $m"
if ! perl -e '
done
fi
-
# DBI has by far the longest test runtime - run less tests
# FIXME horrible horrible hack, need to implement in DBI itself
run_or_err "Downloading latest DBI distdir from CPAN" \
HARD_DEPS="$(echo $(make listdeps))"
##### TEMPORARY WORKAROUNDS
+ if ! CPAN_is_sane ; then
+ # combat dzillirium on harness-wide level, otherwise breakage happens weekly
+ echo_err "$(tstamp) Ancient CPAN.pm: engaging TAP::Harness::IgnoreNonessentialDzilAutogeneratedTests during dep install"
+ perl -MTAP::Harness=3.18 -e1 &>/dev/null || run_or_err "Upgrading TAP::Harness for HARNESS_SUBCLASS support" "cpan TAP::Harness"
+ export PERL5LIB="$(pwd)/maint/travis-ci_scripts/lib:$PERL5LIB"
+ export HARNESS_SUBCLASS="TAP::Harness::IgnoreNonessentialDzilAutogeneratedTests"
+ # sanity check, T::H does not report sensible errors when the subclass fails to load
+ perl -MTAP::Harness::IgnoreNonessentialDzilAutogeneratedTests -e1
+
+ # FIXME
+ # parent is temporary due to Carp https://rt.cpan.org/Ticket/Display.html?id=88494
+ HARD_DEPS="parent $HARD_DEPS"
+
+ if CPAN_supports_BUILDPL ; then
+ # We will invoke a posibly MBT based BUILD-file, but we do not support
+ # configure requires. So we not only need to install MBT but its prereqs
+ # FIXME This is madness
+ HARD_DEPS="$(extract_prereqs Module::Build::Tiny) Module::Build::Tiny $HARD_DEPS"
+ else
+ # FIXME
+ # work around Params::Validate not having a Makefile.PL so really old
+ # toolchains can not figure out what the prereqs are ;(
+ # Need to do more research before filing a bug requesting Makefile inclusion
+ HARD_DEPS="$(extract_prereqs Params::Validate) $HARD_DEPS"
+ fi
+ fi
+##### END TEMPORARY WORKAROUNDS
- # work around Params::Validate not having a Makefile.PL so really old
- # toolchains can not figure out what the prereqs are ;(
- # Need to do more research before filing a bug requesting Makefile inclusion
- perl -M5.008008 -e 1 &> /dev/null || \
- HARD_DEPS="$(extract_prereqs Params::Validate) $HARD_DEPS"
+ run_or_err "Installing/testing dependencies (may take up to 5 minutes): $HARD_DEPS" "cpan $HARD_DEPS"
-##### END TEMPORARY WORKAROUNDS
+ # save the log as we may need it
+ INSTALLDEPS_OUT="$LASTOUT"
- run_or_err "Installing/testing dependencies (may take up to 3 minutes): $HARD_DEPS" "cpan $HARD_DEPS"
+### FIXME in case we set it earlier in a workaround
+ if [[ -n "$HARNESS_SUBCLASS" ]] ; then
- # this is a fucked CPAN - save the log as we may need it
- CPAN_is_sane || INSTALLDEPS_OUT="$LASTOUT"
+ INSTALLDEPS_SKIPPED_TESTLIST=$(perl -0777 -e '
+my $in = <>;
+my $re = qr(
+ ^ (?: \QBuilding and testing\E | \s* CPAN\.pm: .+? (?i:build)\S* ) \s+ (\S+)
+ .*?
+ ^ === \s \QSkipping nonessential autogenerated tests: \E([^\n]+)
+)msx;
+while ( $in =~ /$re/g ) {
+ print "!!! Skipped nonessential tests while installing $1: $2\n"
+}
+' <<< "$LASTOUT")
-else
- # listalldeps is deliberate - will upgrade everything it can find
- parallel_installdeps_notest $(make listalldeps)
+ unset HARNESS_SUBCLASS
+ fi
+else
if [[ -n "$TEST_BUILDER_BETA_CPAN_TARBALL" ]] ; then
parallel_installdeps_notest $TEST_BUILDER_BETA_CPAN_TARBALL
fi
+
+ # listalldeps is deliberate - will upgrade everything it can find
+ parallel_installdeps_notest $(make listalldeps)
fi
-echo_err "$(tstamp) Dependency configuration finished"
+echo_err "$(tstamp) Dependency installation finished"
# this will display list of available versions
perl Makefile.PL
--- /dev/null
+package TAP::Harness::IgnoreNonessentialDzilAutogeneratedTests;
+
+use warnings;
+use strict;
+
+use base 'TAP::Harness';
+use File::Spec;
+use IPC::Open2 'open2';
+
+my $frivolous_test_map = {
+# Test based on the extremely dep-heavy, *prone to failures* Test::CheckDeps
+#
+ 't/00-check-deps.t' => [
+ qr|^\Q# this test was generated with Dist::Zilla::Plugin::Test::CheckDeps|m,
+
+ # older non-annotated versions
+ qr|use \s+ Test::CheckDeps .*? ^\Qcheck_dependencies('suggests')\E .*? \QBAIL_OUT("Missing dependencies") if !Test::More->builder->is_passing|smx,
+ ],
+
+# "does everything compile" tests are useless by definition - this is what the
+# rest of the test suite is for
+#
+ 't/00-compile.t' => [
+ qr|^\Q# this test was generated with Dist::Zilla::Plugin::Test::Compile|m,
+ ],
+};
+
+sub aggregate_tests {
+ my ($self, $aggregate, @all_tests) = @_;
+
+ my ($run_tests, $skip_tests);
+
+ TESTFILE:
+ for (@all_tests) {
+ my $fn = File::Spec::Unix->catpath( File::Spec->splitpath( $_ ) );
+
+ if (my $REs = $frivolous_test_map->{$fn}) {
+ my $slurptest = do { local (@ARGV, $/) = $fn; <> };
+ $slurptest =~ $_ and push @$skip_tests, $fn and next TESTFILE for @$REs;
+ }
+
+ push @$run_tests, $fn;
+ }
+
+ if ($skip_tests) {
+
+ for (@$skip_tests) {
+
+ my $pid = open2(File::Spec->devnull, undef, $^X, qw(-I blib -I arch/lib), $_ )
+ or die "Sub-proc failed: $!";
+ waitpid ($pid, 0);
+
+ $_ .= "[would NOT have passed: $?]" if $?;
+ }
+
+ print STDERR "=== Skipping nonessential autogenerated tests: @$skip_tests\n";
+ }
+
+ return $self->SUPER::aggregate_tests($aggregate, @$run_tests);
+}
+
+1;