X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F40_script.bash;h=5f4d57c07554c96f09e9896275dc7ab7dd15df65;hb=db83437ef48f4571e1d225572cc7235eb5e64fe3;hp=c95ce1f9c0bbfb497312d78b980e7eb8a6c73b2a;hpb=5ac4a96d843a246b621d0e225cb693323f5d2227;p=dbsrgits%2FDBIx-Class.git diff --git a/maint/travis-ci_scripts/40_script.bash b/maint/travis-ci_scripts/40_script.bash index c95ce1f..5f4d57c 100755 --- a/maint/travis-ci_scripts/40_script.bash +++ b/maint/travis-ci_scripts/40_script.bash @@ -7,9 +7,21 @@ if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi run_harness_tests() { local -x HARNESS_OPTIONS=c:j$VCPU_USE + # if we run under docker (! have_sudo) the logic below won't work + # it seems as if ulimit acts globally, across the entire OS + # and is thus not served properly by a localised `ps xH` + if [[ "$VCPU_USE" == 1 ]] && have_sudo ; then + ulim=$(( ( $(ps xH | wc -l) - 3 ) + 4 )) # (real count excluding header + ps + wc) + space for ( make + tee + harness + ) + echo_err "$(tstamp) Setting process/thread limit to $ulim" + ulimit -u $ulim + sleep 5 # needed to settle things down a bit + fi make test 2> >(tee "$TEST_STDERR_LOG") } +# announce everything we have on this box +TRAVIS="" perl -Ilib t/00describe_environment.t >/dev/null + TEST_T0=$SECONDS if [[ "$CLEANTEST" = "true" ]] ; then echo_err "$(tstamp) Running tests with plain \`make test\`" @@ -28,7 +40,12 @@ else fi TEST_T1=$SECONDS -if [[ -z "$DBIC_TRACE" ]] && [[ -z "$DBIC_MULTICREATE_DEBUG" ]] && [[ -s "$TEST_STDERR_LOG" ]] ; then +if \ + [[ -z "$DBIC_TRACE" ]] \ +&& [[ -z "$DBIC_MULTICREATE_DEBUG" ]] \ +&& [[ -z "$DBICTEST_DEBUG_CONCURRENCY_LOCKS" ]] \ +&& [[ -z "$DBICTEST_VERSION_WARNS_INDISCRIMINATELY" ]] \ +&& [[ -s "$TEST_STDERR_LOG" ]] ; then STDERR_LOG_SIZE=$(wc -l < "$TEST_STDERR_LOG") # prepend STDERR log @@ -49,6 +66,6 @@ echo "${POSTMORTEM:- \o/ No notable smoke run issues \o/ }" echo echo "$(tstamp) Testing took a total of $(( $TEST_T1 - $TEST_T0 ))s" if [[ -n "$INSTALLDEPS_OUT" ]] ; then - echo "$(tstamp) Full dep install log at $(/usr/bin/nopaste -q -s Shadowcat -d DepInstall <<< "$INSTALLDEPS_OUT")" + echo "$(tstamp) Full dep install log at $(/usr/bin/perl /usr/bin/nopaste -q -s Shadowcat -d DepInstall <<< "$INSTALLDEPS_OUT")" fi echo