Run the entire test suite under replicated SQLite on DBICTEST_VIA_REPLICATED
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 20_install.bash
index 7db49bb..c5b9895 100755 (executable)
@@ -16,10 +16,6 @@ if [[ "$DEVREL_DEPS" == "true" ]] ; then
 
   PERL_CPANM_OPT="$PERL_CPANM_OPT --dev"
 
-  # FIXME inline-upgrade cpanm, work around https://github.com/travis-ci/travis-ci/issues/1477
-  cpanm_loc="$(which cpanm)"
-  run_or_err "Upgrading cpanm ($cpanm_loc) to latest stable" \
-    "wget -q -O $cpanm_loc cpanmin.us && chmod a+x $cpanm_loc"
 fi
 
 # Fixup CPANM_OPT to behave more like a traditional cpan client
@@ -50,7 +46,7 @@ if [[ -n "$BREWVER" ]] ; then
 # the presently installed libs
 # Idea stolen from
 # https://github.com/kentfredric/Dist-Zilla-Plugin-Prereqs-MatchInstalled-All/blob/master/maint-travis-ci/sterilize_env.pl
-# Only works on 5.12+ (where sitlib was finally properly fixed)
+# Only works on 5.12+ (where sitelib was finally properly fixed)
 elif [[ "$CLEANTEST" == "true" ]] && [[ "$POISON_ENV" != "true" ]] && perl -M5.012 -e 1 &>/dev/null ; then
 
   echo_err "$(tstamp) Cleaning precompiled Travis-Perl"
@@ -90,6 +86,8 @@ if [[ "$POISON_ENV" = "true" ]] ; then
   # returned results, look through lib, find all mentioned ENVvars and
   # set them to true and see if anything explodes
   for var in \
+    DBICTEST_SQLITE_USE_FILE \
+    DBICTEST_RUN_ALL_TESTS \
     DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER \
     $( grep -P '\$ENV\{' -r lib/ --exclude-dir Optional | grep -oP '\bDBIC\w+' | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' )
   do
@@ -103,6 +101,12 @@ if [[ "$POISON_ENV" = "true" ]] ; then
   export DBI_DSN="dbi:ODBC:server=NonexistentServerAddress"
   export DBI_DRIVER="ADO"
 
+  # if we have Moose - try to run everything under replicated
+  # FIXME - when switching to Moo kill this
+  if [[ "$CLEANTEST" != "true" ]] && perl -M5.008003 -e 1 &>/dev/null ; then
+    export DBICTEST_VIA_REPLICATED=1
+  fi
+
   # some people do in fact set this - boggle!!!
   # it of course won't work before 5.8.4
   if perl -M5.008004 -e 1 &>/dev/null ; then