Restore ability to handle underdefined root (t/prefetch/incomplete.t)
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 30_before_script.bash
index 5351080..24e405a 100755 (executable)
@@ -3,6 +3,15 @@
 source maint/travis-ci_scripts/common.bash
 if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi
 
+# try Schwern's latest offering on a stock perl and a threaded blead
+# can't do this with CLEANTEST=true yet because a lot of our deps fail
+# tests left and right under T::B 1.5
+if [[ "$CLEANTEST" != "true" ]] && ( [[ -z "$BREWVER" ]] || [[ "$BREWVER" = "blead" ]] ) ; then
+  # FIXME - there got to be a way to ask metacpan for this dynamically
+  TEST_BUILDER_BETA_CPAN_TARBALL="M/MS/MSCHWERN/Test-Simple-1.005000_005.tar.gz"
+fi
+
+
 if [[ "$CLEANTEST" = "true" ]]; then
   # get the last inc/ off cpan - we will get rid of MI
   # soon enough, but till then this will do
@@ -16,6 +25,12 @@ if [[ "$CLEANTEST" = "true" ]]; then
 
   mv ~/.cpanm/latest-build/DBIx-Class-*/inc .
 
+  # this should be installable anywhere, regardles of prereqs
+  if [[ -n "$TEST_BUILDER_BETA_CPAN_TARBALL" ]] ; then
+    run_or_err "Pre-installing dev-beta of Test::Builder ($TEST_BUILDER_BETA_CPAN_TARBALL)" \
+      "cpan $TEST_BUILDER_BETA_CPAN_TARBALL"
+  fi
+
   # older perls do not have a CPAN which understands configure_requires
   # properly and what is worse a `cpan Foo` run exits with 0 even if some
   # modules failed to install
@@ -97,9 +112,11 @@ if [[ "$CLEANTEST" = "true" ]]; then
 
 ##### TEMPORARY WORKAROUNDS
 
-  # not sure what's going on here yet
+  # The unicode-in-yaml bug on older cpan clients
+  # FIXME there got to be a saner way to fix this...
   perl -M5.008008 -e 1 &> /dev/null || \
-    parallel_installdeps_notest multidimensional bareword::filehandles
+     run_or_err "Installing multidimensional and bareword::filehandles via cpanm" \
+        "cpanm multidimensional bareword::filehandles"
 
   # work around Params::Validate not having a Makefile.PL so really old
   # toolchains can not figure out what the prereqs are ;(
@@ -109,7 +126,7 @@ if [[ "$CLEANTEST" = "true" ]]; then
 
 ##### END TEMPORARY WORKAROUNDS
 
-  run_or_err "Installing/testing dependencies (may take up to 10 minutes): $HARD_DEPS" "cpan $HARD_DEPS"
+  run_or_err "Installing/testing dependencies (may take up to 3 minutes): $HARD_DEPS" "cpan $HARD_DEPS"
 
   # this is a fucked CPAN - save the log as we may need it
   CPAN_is_sane || INSTALLDEPS_OUT="$LASTOUT"
@@ -117,6 +134,10 @@ if [[ "$CLEANTEST" = "true" ]]; then
 else
   # listalldeps is deliberate - will upgrade everything it can find
   parallel_installdeps_notest $(make listalldeps)
+
+  if [[ -n "$TEST_BUILDER_BETA_CPAN_TARBALL" ]] ; then
+    parallel_installdeps_notest $TEST_BUILDER_BETA_CPAN_TARBALL
+  fi
 fi
 
 echo_err "$(tstamp) Dependency configuration finished"