X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F40_script.bash;h=3b8b1109d744aa95c3bd6e4e40413737b37a51bb;hb=da9346a03a7df80d02f40584422af71fbd2ca4f8;hp=c0445077841c6e95485f0842a3e30890c51c7585;hpb=b58ecb01825f4afa0a13f76b799cd4608bb96ee2;p=dbsrgits%2FDBIx-Class.git diff --git a/maint/travis-ci_scripts/40_script.bash b/maint/travis-ci_scripts/40_script.bash index c044507..3b8b110 100755 --- a/maint/travis-ci_scripts/40_script.bash +++ b/maint/travis-ci_scripts/40_script.bash @@ -1,19 +1,68 @@ #!/bin/bash +# this file is executed in a subshell - set up the common stuff source maint/travis-ci_scripts/common.bash -if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi -export HARNESS_TIMER=1 HARNESS_OPTIONS=c:j$NUMTHREADS +if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi -START_TIME=$SECONDS +run_harness_tests() { + local -x HARNESS_OPTIONS=c:j$VCPU_USE + if [[ "$VCPU_USE" == 1 ]]; 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 10 # 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\`" run_or_err "Prepare blib" "make pure_all" - make test + run_harness_tests else - PROVECMD="prove -lrswj$NUMTHREADS t xt" + PROVECMD="prove -lrswj$VCPU_USE xt t" + + # FIXME - temporary, until Package::Stash is fixed + if perl -M5.010 -e 1 &>/dev/null ; then + PROVECMD="$PROVECMD -T" + fi + echo_err "$(tstamp) running tests with \`$PROVECMD\`" - $PROVECMD + $PROVECMD 2> >(tee "$TEST_STDERR_LOG") fi +TEST_T1=$SECONDS -echo "$(tstamp) Testing took a total of $(( $SECONDS - $START_TIME ))s" +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 + POSTMORTEM="$( + echo + echo "Test run produced $STDERR_LOG_SIZE lines of output on STDERR:" + echo "=============================================================" + cat "$TEST_STDERR_LOG" + echo "=============================================================" + echo "End of test run STDERR output ($STDERR_LOG_SIZE lines)" + echo + echo + )$POSTMORTEM" +fi + +echo +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")" +fi +echo