From: Peter Rabbitson Date: Fri, 13 Dec 2013 22:23:21 +0000 (+0100) Subject: Run parallel_installdeps_notest() with a timeout as well X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=851b6c2d67c7682a64f201dd4c9fcadb6694c06e;p=dbsrgits%2FDBIx-Class-Historic.git Run parallel_installdeps_notest() with a timeout as well --- diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index 99a2da4..ff048a9 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -3,6 +3,7 @@ set -e TEST_STDERR_LOG=/tmp/dbictest.stderr +TIMEOUT_CMD="/usr/bin/timeout --kill-after=9.5m --signal=TERM 9m" echo_err() { echo "$@" 1>&2 ; } @@ -102,7 +103,7 @@ parallel_installdeps_notest() { "echo \\ \"$MODLIST\" \\ | xargs -d '\\n' -n 1 -P $NUMTHREADS bash -c \\ - 'OUT=\$(cpanm --notest --no-man-pages \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\ + 'OUT=\$($TIMEOUT_CMD cpanm --notest --no-man-pages \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\ 'giant space monkey penises' " } @@ -156,7 +157,7 @@ installdeps() { } cpan_inst() { - /usr/bin/timeout --kill-after=9.5m --signal=TERM 9m cpan "$@" 2>&1 + $TIMEOUT_CMD cpan "$@" 2>&1 # older perls do not have a CPAN which can exit with error on failed install for m in "$@"; do