(travis) Restore proper post-success testing
[dbsrgits/DBIx-Class-Historic.git] / maint / travis-ci_scripts / common.bash
index ee447e3..faf47de 100755 (executable)
@@ -4,7 +4,7 @@
 set -e
 
 TEST_STDERR_LOG=/tmp/dbictest.stderr
-TIMEOUT_CMD="/usr/bin/timeout --kill-after=9.5m --signal=TERM 9m"
+TIMEOUT_CMD="/usr/bin/timeout --kill-after=16m --signal=TERM 15m"
 
 echo_err() { echo "$@" 1>&2 ; }
 
@@ -87,9 +87,6 @@ apt_install() {
   # flatten
   pkgs="$@"
 
-  # Need to do this at every step, the sources list may very well have changed
-  run_or_err "Updating APT available package list" "sudo apt-get update"
-
   run_or_err "Installing Debian APT packages: $pkgs" "sudo apt-get install --allow-unauthenticated  --no-install-recommends -y $pkgs"
 }
 
@@ -135,7 +132,7 @@ parallel_installdeps_notest() {
   if [[ -z "$@" ]] ; then return; fi
 
   # one module spec per line
-  MODLIST="$(printf '%s\n' "$@")"
+  MODLIST="$(printf '%s\n' "$@" | sort -R)"
 
   # We want to trap the output of each process and serially append them to
   # each other as opposed to just dumping a jumbled up mass-log that would
@@ -193,10 +190,10 @@ _dep_inst_with_test() {
   if [[ "$DEVREL_DEPS" == "true" ]] ; then
     # --dev is already part of CPANM_OPT
     LASTCMD="$TIMEOUT_CMD cpanm $@"
-    $LASTCMD 2>&1
+    $LASTCMD 2>&1 || return 1
   else
     LASTCMD="$TIMEOUT_CMD cpan $@"
-    $LASTCMD 2>&1
+    $LASTCMD 2>&1 || return 1
 
     # older perls do not have a CPAN which can exit with error on failed install
     for m in "$@"; do