From: Peter Rabbitson Date: Mon, 11 Apr 2016 13:53:04 +0000 (+0200) Subject: (travis) Add a CLEANTEST run of RURBAN's cperl in the spirit of 62f2092b X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=64d48e1989b06ff4cdb33eb7b16846d511168c64;p=dbsrgits%2FDBIx-Class-Historic.git (travis) Add a CLEANTEST run of RURBAN's cperl in the spirit of 62f2092b Refer to the (*really* small) patchset for info on how to run the same locally TLDR: you need to activate distroprefs and use CPAN.pm --- diff --git a/.travis.yml b/.travis.yml index 0260450..93ec06b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -204,6 +204,8 @@ matrix: - DBICTEST_VIA_REPLICATED=0 - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1 + # MAKE SURE TO KEEP THE FLAGS IDENTICAL TO CPERL BELOW + # allows for easier side-by-side comparison - perl: "5.22.1_thr_qm" # explicit new infra spec preparing for a future forced upgrade # also need to pull in a sufficiently new compiler for quadmath.h @@ -220,6 +222,22 @@ matrix: ### # Start of the allow_failures block + # MAKE SURE TO KEEP THE FLAGS IDENTICAL TO STOCK 5.22.1 ABOVE + # allows for easier side-by-side comparison + - perl: "cperl-5.22.1_thr_qm" + # explicit new infra spec preparing for a future forced upgrade + # also need to pull in a sufficiently new compiler for quadmath.h + sudo: required + dist: trusty + env: + # FIXME - work around https://github.com/perl11/cperl/issues/131 + - VCPU_USE=1 + - CLEANTEST=true + - POISON_ENV=true + - MVDT=false + - BREWVER=cperl-5.22.1 + - BREWOPTS="-Duseithreads -Dusequadmath" + # threaded oldest possible with blead CPAN - perl: "devcpan_5.8.1_thr_mb" sudo: false @@ -330,6 +348,7 @@ matrix: allow_failures: # these run with various dev snapshots - allowed to fail + - perl: cperl-5.22.1_thr_qm - perl: devcpan_5.8.1_thr_mb - perl: devcpan_5.8.1 - perl: devcpan_5.8.3_mb diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash index 08e25c4..7628b4a 100755 --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -31,7 +31,11 @@ if [[ -n "$BREWVER" ]] ; then BREWSRC="$BREWVER" - if [[ "$BREWVER" == "schmorp_stableperl" ]] ; then + if is_cperl; then + # FFS perlbrew ( see http://wollmers-perl.blogspot.de/2015/10/install-cperl-with-perlbrew.html ) + wget -qO- https://github.com/perl11/cperl/archive/$BREWVER.tar.gz > /tmp/cperl-$BREWVER.tar.gz + BREWSRC="/tmp/cperl-$BREWVER.tar.gz" + elif [[ "$BREWVER" == "schmorp_stableperl" ]] ; then BREWSRC="http://stableperl.schmorp.de/dist/stableperl-5.22.0-1.001.tar.gz" fi diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index 79a360d..3965bca 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -11,6 +11,19 @@ if [[ "$DEVREL_DEPS" == "true" ]] ; then export MVDT="" fi +# Need a shitton of patches to run on cperl (luckily all provided) +# Also need to have YAML in place, otherwise the distroprefs are not readable +if is_cperl ; then + + run_or_err "Downloading and installing cperl distroprefs" ' + wget -qO- https://github.com/rurban/distroprefs/archive/master.tar.gz |\ + tar -C $HOME/.cpan --strip-components 1 -zx distroprefs-master/prefs distroprefs-master/sources + ' + + installdeps YAML + +fi + # FIXME - this is a kludge in place of proper MDV testing. For the time # being simply use the minimum versions of our DBI/DBDstack, to avoid # fuckups like 0.08260 (went unnoticed for 5 months) diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index f73adde..7bbcfab 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -135,6 +135,8 @@ extract_prereqs() { parallel_installdeps_notest() { if [[ -z "$@" ]] ; then return; fi + is_cperl && echo_err "cpanminus is not yet usable on cperl" && exit 1 + # one module spec per line MODLIST="$(printf '%s\n' "$@" | sort -R)" @@ -194,6 +196,8 @@ installdeps() { _dep_inst_with_test() { if [[ "$DEVREL_DEPS" == "true" ]] ; then + is_cperl && echo_err "cpanminus is not yet usable on cperl" && exit 1 + # --dev is already part of CPANM_OPT LASTCMD="$TIMEOUT_CMD cpanm $@" $LASTCMD 2>&1 || return 1 @@ -328,3 +332,5 @@ CPAN_is_sane() { perl -MCPAN\ 1.94_56 -e 1 &>/dev/null ; } CPAN_supports_BUILDPL() { perl -MCPAN\ 1.9205 -e1 &>/dev/null; } have_sudo() { sudo /bin/true &>/dev/null ; } + +is_cperl() { [[ "$BREWVER" =~ $( echo -n "^cperl-" ) ]] ; } diff --git a/t/lib/ANFANG.pm b/t/lib/ANFANG.pm index 05304bf..4e49fe0 100644 --- a/t/lib/ANFANG.pm +++ b/t/lib/ANFANG.pm @@ -46,6 +46,13 @@ $INC{$_} ||= __FILE__ for (qw( ANFANG.pm t/lib/ANFANG.pm ./t/lib/ANFANG.pm )); and + # a ghetto way of recognizing cperl without loading Config.pm + # the $] guard is there because touching $^V on pre-5.10 loads + # the entire utf8 stack (wtf!!!) + ( "$]" < 5.010 or $^V !~ /\d+c$/ ) + + and + # just don't check anything under RELEASE_TESTING # a naive approach would be to simply whitelist both # strict and warnings, but pre 5.10 there were even diff --git a/xt/extra/internals/optional_deps.t b/xt/extra/internals/optional_deps.t index f2feb4e..de45ae0 100644 --- a/xt/extra/internals/optional_deps.t +++ b/xt/extra/internals/optional_deps.t @@ -17,6 +17,7 @@ use Scalar::Util(); use MRO::Compat(); use Carp 'confess'; use List::Util 'shuffle'; +use Config; SKIP: { skip 'Lean load pattern testing unsafe with $ENV{PERL5OPT}', 1 @@ -28,6 +29,9 @@ SKIP: { skip 'Lean load pattern testing useless with $ENV{RELEASE_TESTING}', 1 if $ENV{RELEASE_TESTING}; + skip 'Lean load pattern testing useless under cperl', 1 + if $Config{usecperl}; + is_deeply $inc_before, [],