Engage nuclear option of travis testing
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 30_before_script.bash
index d23b6cd..706c979 100755 (executable)
@@ -45,9 +45,7 @@ if [[ "$CLEANTEST" = "true" ]]; then
     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 '
@@ -64,7 +62,6 @@ eval ( q{require } . (
     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" \
@@ -117,30 +114,67 @@ if [[ "$CLEANTEST" = "true" ]]; then
   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