X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F30_before_script.bash;h=d23b6cd7c8122d7cb5ff2c8f9d71ab11e1c6088d;hb=37ab4b67abfeac8dd69ca9165ee001d2bda5285a;hp=d8817324bb9cd06d93aa718bde3014cc3dcd5d3e;hpb=189142afe79277acea0b50a0c6965b6e8eaa9ce8;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index d881732..d23b6cd 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -3,15 +3,21 @@ source maint/travis-ci_scripts/common.bash if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi -# try Schwern's latest offering on a stock perl and a threaded blead -# can't do this with CLEANTEST=true yet because a lot of our deps fail -# tests left and right under T::B 1.5 -if [[ "$CLEANTEST" != "true" ]] && ( [[ -z "$BREWVER" ]] || [[ "$BREWVER" = "blead" ]] ) ; then - # FIXME - there got to be a way to ask metacpan for this dynamically - TEST_BUILDER_BETA_CPAN_TARBALL="M/MS/MSCHWERN/Test-Simple-1.005000_005.tar.gz" +# poison the environment - basically look through lib, find all mentioned +# ENVvars and set them to true and see if anything explodes +if [[ "$POISON_ENV" = "true" ]] ; then + for var in $(grep -P '\$ENV\{' -r lib/ | grep -oP 'DBIC_\w+' | sort -u | grep -v DBIC_TRACE) ; do + if [[ -z "${!var}" ]] ; then + export $var=1 + fi + done + + export DBI_DSN="dbi:ODBC:server=NonexistentServerAddress" + export DBI_DRIVER="ADO" + + export DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER=1 fi - if [[ "$CLEANTEST" = "true" ]]; then # get the last inc/ off cpan - we will get rid of MI # soon enough, but till then this will do @@ -25,12 +31,6 @@ if [[ "$CLEANTEST" = "true" ]]; then mv ~/.cpanm/latest-build/DBIx-Class-*/inc . - # this should be installable anywhere, regardles of prereqs - if [[ -n "$TEST_BUILDER_BETA_CPAN_TARBALL" ]] ; then - run_or_err "Pre-installing dev-beta of Test::Builder ($TEST_BUILDER_BETA_CPAN_TARBALL)" \ - "cpan $TEST_BUILDER_BETA_CPAN_TARBALL" - fi - # older perls do not have a CPAN which understands configure_requires # properly and what is worse a `cpan Foo` run exits with 0 even if some # modules failed to install @@ -41,15 +41,30 @@ if [[ "$CLEANTEST" = "true" ]]; then # possible, mainly to catch "but X is perl core" mistakes # So instead we still use our stock (possibly old) CPAN, and add some # handholding - CPAN_is_sane || \ - run_or_err "Pre-installing ExtUtils::MakeMaker and Module::Build" \ - "cpan ExtUtils::MakeMaker Module::Build" - - if ! perl -MModule::Build -e 1 &> /dev/null ; then - echo_err -e "Module::Build installation failed\n$LASTOUT" - exit 1 + if ! CPAN_is_sane ; then + for m in \ +ExtUtils::MakeMaker \ +ExtUtils::CBuilder \ +R/RS/RSAVAGE/Tree-DAG_Node-1.13.tgz \ +Module::Build \ +E/ET/ETHER/Class-Method-Modifiers-2.04.tar.gz \ +; do + run_or_err "Pre-installing $m" "cpan $m" + 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 + + echo_err -e "$m installation failed\n$LASTOUT" + exit 1 + fi + done fi + # DBI has by far the longest test runtime - run less tests # FIXME horrible horrible hack, need to implement in DBI itself run_or_err "Downloading latest DBI distdir from CPAN" \ @@ -66,31 +81,28 @@ else # do the preinstall in several passes to minimize amount of cross-deps installing # multiple times, and to avoid module re-architecture breaking another install - # (e.g. once Carp is upgraded there's no more Carp::Heavy) + # (e.g. once Carp is upgraded there's no more Carp::Heavy, + # while a File::Path upgrade may cause a parallel EUMM run to fail) # parallel_installdeps_notest ExtUtils::MakeMaker + parallel_installdeps_notest File::Path parallel_installdeps_notest Carp - parallel_installdeps_notest Module::Build - parallel_installdeps_notest Module::Runtime ExtUtils::Depends File::Spec Data::Dumper - parallel_installdeps_notest Test::Exception Encode::Locale Test::Fatal - parallel_installdeps_notest Test::Warn bareword::filehandles B::Hooks::EndOfScope Test::Differences HTTP::Status + parallel_installdeps_notest Module::Build Module::Runtime + parallel_installdeps_notest File::Spec Data::Dumper + parallel_installdeps_notest Test::Exception Encode::Locale Test::Fatal R/RS/RSAVAGE/Tree-DAG_Node-1.13.tgz + parallel_installdeps_notest Test::Warn B::Hooks::EndOfScope Test::Differences HTTP::Status parallel_installdeps_notest Test::Pod::Coverage Test::EOL Devel::GlobalDestruction Sub::Name MRO::Compat Class::XSAccessor URI::Escape HTML::Entities - parallel_installdeps_notest YAML LWP Moose Class::Trigger JSON::XS DBI - parallel_installdeps_notest Moo Class::Accessor::Grouped Module::Install JSON DateTime + parallel_installdeps_notest YAML LWP Class::Trigger JSON::XS DBI DateTime::Format::Builder Class::Accessor::Grouped Package::Variant + parallel_installdeps_notest Moose Module::Install JSON SQL::Translator File::Which if [[ -n "DBICTEST_FIREBIRD_DSN" ]] ; then - # the official version is full of 5.10-isms, but works perfectly fine on 5.8 - # pull in our patched copy - run_or_err "Fetching patched DBD::Firebird" \ - "git clone https://github.com/dbsrgits/perl-dbd-firebird-5.8.git ~/dbd-firebird" - # the official version is very much outdated and does not compile on 5.14+ # use this rather updated source tree (needs to go to PAUSE): # https://github.com/pilcrow/perl-dbd-interbase run_or_err "Fetching patched DBD::InterBase" \ "git clone https://github.com/dbsrgits/perl-dbd-interbase ~/dbd-interbase" - parallel_installdeps_notest ~/dbd-interbase/ ~/dbd-firebird/ + parallel_installdeps_notest ~/dbd-interbase/ fi fi @@ -104,18 +116,8 @@ if [[ "$CLEANTEST" = "true" ]]; then # we may need to prepend some stuff to that list HARD_DEPS="$(echo $(make listdeps))" - # this is a fucked CPAN - won't understand configure_requires of - # various pieces we may run into - CPAN_is_sane || HARD_DEPS="ExtUtils::Depends B::Hooks::OP::Check $HARD_DEPS" - ##### TEMPORARY WORKAROUNDS - # The unicode-in-yaml bug on older cpan clients - # FIXME there got to be a saner way to fix this... - perl -M5.008008 -e 1 &> /dev/null || \ - run_or_err "Installing multidimensional and bareword::filehandles via cpanm" \ - "cpanm multidimensional bareword::filehandles" - # work around Params::Validate not having a Makefile.PL so really old # toolchains can not figure out what the prereqs are ;( # Need to do more research before filing a bug requesting Makefile inclusion