(travis) Add 5.22.1 with quadmath testing
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 20_install.bash
index 515b176..08e25c4 100755 (executable)
@@ -38,10 +38,10 @@ if [[ -n "$BREWVER" ]] ; then
   run_or_err "Compiling/installing Perl $BREWVER (without testing, using ${perlbrew_jopt:-1} threads, may take up to 5 minutes)" \
     "perlbrew install --as $BREWVER --notest --noman --verbose $BREWOPTS -j${perlbrew_jopt:-1}  $BREWSRC"
 
-  # can not do 'perlbrew uss' in the run_or_err subshell above, or a $()
-  # furthermore `perlbrew use` returns 0 regardless of whether the perl is
-  # found (won't be there unless compilation suceeded, wich *ALSO* returns 0)
-  perlbrew use $BREWVER
+  # can not do 'perlbrew use' in the run_or_err subshell above, or a $()
+  # furthermore some versions of `perlbrew use` return 0 regardless of whether
+  # the perl is found (won't be there unless compilation suceeded, wich *ALSO* returns 0)
+  perlbrew use $BREWVER || /bin/true
 
   if [[ "$( perlbrew use | grep -oP '(?<=Currently using ).+' )" != "$BREWVER" ]] ; then
     echo_err "Unable to switch to $BREWVER - compilation failed...?"
@@ -86,6 +86,17 @@ fi
 # poison the environment
 if [[ "$POISON_ENV" = "true" ]] ; then
 
+  toggle_vars=( MVDT )
+
+  [[ "$CLEANTEST" == "true" ]] && toggle_vars+=( BREAK_CC )
+
+  for var in "${toggle_vars[@]}"  ; do
+    if [[ -z "${!var}" ]] ; then
+      export $var=true
+      echo "POISON_ENV: setting $var to 'true'"
+    fi
+  done
+
   # look through lib, find all mentioned DBIC* ENVvars and set them to true and see if anything explodes
   toggle_booleans=( $( grep -ohP '\bDBIC_[0-9_A-Z]+' -r lib/ --exclude-dir Optional | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' ) )