From: Peter Rabbitson Date: Sun, 15 Dec 2013 10:20:53 +0000 (+0100) Subject: Add *clean devrel* smokes (full testing of devrels of our deps using cpanm) X-Git-Tag: v0.08260~67 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e6b373aac60c01e3ef321d79e382ef9135c0f303;p=dbsrgits%2FDBIx-Class.git Add *clean devrel* smokes (full testing of devrels of our deps using cpanm) --- diff --git a/.travis.yml b/.travis.yml index eb3ec76..872a4c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -156,6 +156,22 @@ matrix: ### # Start of the allow_failures block + # 5.10.0 threaded with blead CPAN + - perl: devcpan_5.10.0_thr_mb + env: + - CLEANTEST=true + - BREWOPTS="-Duseithreads -Dusemorebits" + - BREWVER=5.10.0 + - DEVREL_DEPS=true + + # minimum threaded with blead CPAN + - perl: devcpan_5.8.5_thr + env: + - CLEANTEST=true + - BREWOPTS="-Duseithreads" + - BREWVER=5.8.5 + - DEVREL_DEPS=true + # recentish stable with blead CPAN - perl: devcpan_5.18.1_thr_mb env: @@ -183,6 +199,8 @@ matrix: # which ones of the above can fail allow_failures: # these run with various dev snapshots - allowed to fail + - perl: devcpan_5.10.0_thr_mb + - perl: devcpan_5.8.5_thr - perl: devcpan_5.18.1_thr_mb - perl: bleadperl_thr_mb - perl: devcpan_bleadperl_thr_mb diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash index a05823d..e254fb2 100755 --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -17,11 +17,6 @@ export PERL_MM_USE_DEFAULT=1 PERL_MM_NONINTERACTIVE=1 PERL_AUTOINSTALL_PREFER_CP # try CPAN's latest offering if requested if [[ "$DEVREL_DEPS" == "true" ]] ; then - if [[ "$CLEANTEST" == "true" ]] ; then - echo_err "DEVREL_DEPS combined with CLEANTEST makes no sense - it is only possible with cpanm" - exit 1 - fi - PERL_CPANM_OPT="$PERL_CPANM_OPT --dev" # FIXME inline-upgrade cpanm, work around https://github.com/travis-ci/travis-ci/issues/1477 diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index 538157a..c2faa1a 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -43,11 +43,19 @@ if [[ "$CLEANTEST" = "true" ]]; then # without pre-installign these in one pass things like extract_prereqs won't work CPAN_is_sane || installdeps ExtUtils::MakeMaker ExtUtils::CBuilder Module::Build + # FIXME - need new TB1.5 devrel + # if we run under --dev install latest github of TB1.5 first + # (unreleased workaround for precedence warnings) + if [[ "$DEVREL_DEPS" == "true" ]] ; then + installdeps git://github.com/nthykier/test-more.git@fix-return-precedence-issue + fi + else # we will be running all dbic tests - preinstall lots of stuff, run basic tests # using SQLT and set up whatever databases necessary export DBICTEST_SQLT_DEPLOY=1 + # FIXME - need new TB1.5 devrel # if we run under --dev install latest github of TB1.5 first # (unreleased workaround for precedence warnings) if [[ "$DEVREL_DEPS" == "true" ]] ; then @@ -91,8 +99,8 @@ if [[ "$CLEANTEST" = "true" ]]; then # we may need to prepend some stuff to that list HARD_DEPS="$(echo $(make listdeps))" -##### TEMPORARY WORKAROUNDS - if ! CPAN_is_sane ; then +##### TEMPORARY WORKAROUNDS needed in case we will be using CPAN.pm + if [[ "$DEVREL_DEPS" != "true" ]] && ! CPAN_is_sane ; then # combat dzillirium on harness-wide level, otherwise breakage happens weekly echo_err "$(tstamp) Ancient CPAN.pm: engaging TAP::Harness::IgnoreNonessentialDzilAutogeneratedTests during dep install" perl -MTAP::Harness=3.18 -e1 &>/dev/null || run_or_err "Upgrading TAP::Harness for HARNESS_SUBCLASS support" "cpan TAP::Harness" diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index ff048a9..c660905 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -103,7 +103,7 @@ parallel_installdeps_notest() { "echo \\ \"$MODLIST\" \\ | xargs -d '\\n' -n 1 -P $NUMTHREADS bash -c \\ - 'OUT=\$($TIMEOUT_CMD cpanm --notest --no-man-pages \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\ + 'OUT=\$($TIMEOUT_CMD cpanm --notest \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\ 'giant space monkey penises' " } @@ -121,13 +121,13 @@ installdeps() { LASTEXIT=0 START_TIME=$SECONDS - LASTOUT=$( cpan_inst "$@" ) || LASTEXIT=$? + LASTOUT=$( _dep_inst_with_test "$@" ) || LASTEXIT=$? DELTA_TIME=$(( $SECONDS - $START_TIME )) if [[ "$LASTEXIT" = "0" ]] ; then echo_err "done (took ${DELTA_TIME}s)" else - local errlog="after ${DELTA_TIME}s Exit:$LASTEXIT Log:$(/usr/bin/nopaste -q -s Shadowcat -d "Parallel installfail" <<< "$LASTOUT")" + local errlog="after ${DELTA_TIME}s Exit:$LASTEXIT Log:$(/usr/bin/nopaste -q -s Shadowcat -d "Parallel testfail" <<< "$LASTOUT")" echo_err -n "failed ($errlog) retrying with sequential testing ... " POSTMORTEM="$POSTMORTEM$( echo @@ -140,7 +140,7 @@ installdeps() { HARNESS_OPTIONS="" LASTEXIT=0 START_TIME=$SECONDS - LASTOUT=$( cpan_inst "$@" ) || LASTEXIT=$? + LASTOUT=$( _dep_inst_with_test "$@" ) || LASTEXIT=$? DELTA_TIME=$(( $SECONDS - $START_TIME )) if [[ "$LASTEXIT" = "0" ]] ; then @@ -156,23 +156,29 @@ installdeps() { INSTALLDEPS_OUT="${INSTALLDEPS_OUT}${LASTOUT}" } -cpan_inst() { - $TIMEOUT_CMD cpan "$@" 2>&1 +_dep_inst_with_test() { + if [[ "$DEVREL_DEPS" == "true" ]] ; then + # --dev is already part of CPANM_OPT + $TIMEOUT_CMD cpanm "$@" 2>&1 + else + $TIMEOUT_CMD cpan "$@" 2>&1 - # older perls do not have a CPAN which can exit with error on failed install - for m in "$@"; do - if ! perl -e ' + # older perls do not have a CPAN which can exit with error on failed install + for m in "$@"; do + if ! perl -e ' eval ( q{require } . ( $ARGV[0] =~ m{ \/ .*? ([^\/]+) $ }x ? do { my @p = split (/\-/, $1); pop @p; join "::", @p } : $ARGV[0] -) ) or ( print $@ and exit 1)' "$m" 2> /dev/null ; then +) ) or ( print $@ and exit 1) - echo -e "$m installation seems to have failed" - return 1 - fi - done + ' "$m" 2> /dev/null ; then + echo -e "$m installation seems to have failed" + return 1 + fi + done + fi } CPAN_is_sane() { perl -MCPAN\ 1.94_56 -e 1 &>/dev/null ; }