From: Peter Rabbitson Date: Thu, 21 Mar 2013 08:23:41 +0000 (+0100) Subject: Only display output of failed workers in parallel_installdeps_notest X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10e248bf59ce89642a6f366fc7b83e90a56797ac;p=dbsrgits%2FDBIx-Class-Historic.git Only display output of failed workers in parallel_installdeps_notest --- diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index ab5c294..20d5d63 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -61,9 +61,22 @@ parallel_installdeps_notest() { # The reason we do things so "non-interactively" is that xargs -P will have the # latest cpanm instance overwrite the buildlog. There seems to be no way to # specify a custom buildlog, hence we just collect the verbose output - # and display it in case of failure + # and display it in case of "worker" failure + # + # Explanation of inline args: + # + # [09:38] you need a $0 + # [09:38] hence the _ + # [09:38] bash -c '...' _ + # [09:39] I like -- because it's the magic that gnu getopts uses for somethign else + # [09:39] or --, yes + # [09:39] ribasushi: you could put "giant space monkey penises" instead of "--" and it would work just as well + # run_or_err "Installing (without testing) $MODLIST" \ - "echo $MODLIST | xargs -n 1 -P $NUMTHREADS cpanm --notest --no-man-pages" + "echo $MODLIST | xargs -n 1 -P $NUMTHREADS bash -c \\ + 'OUT=\$(cpanm --notest --no-man-pages \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\ + 'giant space monkey penises' + " }