From: Peter Rabbitson Date: Fri, 23 Jan 2015 06:50:50 +0000 (+0100) Subject: (travis) Install extra deps for the t/52leaks.t persistency tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fb8d74ca2854557fbe912d91381f2e91ab101be;p=dbsrgits%2FDBIx-Class-Historic.git (travis) Install extra deps for the t/52leaks.t persistency tests These are not part of OptDeps as the stuff on CPAN is hopelessly outdated. But if we leverage the excellent patchsets prepared by the debian-perl group we can get very very far indeed. --- diff --git a/maint/travis-ci_scripts/30_before_script.bash b/maint/travis-ci_scripts/30_before_script.bash index 27675a3..fae39e6 100755 --- a/maint/travis-ci_scripts/30_before_script.bash +++ b/maint/travis-ci_scripts/30_before_script.bash @@ -97,7 +97,7 @@ else 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 Class::Trigger DateTime::Format::Builder Class::Accessor::Grouped Package::Variant - parallel_installdeps_notest SQL::Abstract Moose Module::Install@1.15 JSON SQL::Translator File::Which Class::DBI::Plugin + parallel_installdeps_notest SQL::Abstract Moose Module::Install@1.15 JSON SQL::Translator File::Which Class::DBI::Plugin git://github.com/dbsrgits/perl-pperl.git # 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): @@ -106,6 +106,12 @@ else parallel_installdeps_notest git://github.com/dbsrgits/perl-dbd-interbase.git fi + # SCGI does not install under < 5.8.8 perls nor under parallel make + # FIXME: The 5.8.8 thing is likely fixable, something to do with + # #define speedy_new(s,n,t) Newx(s,n,t) + if perl -M5.008008 -e 1 &>/dev/null ; then + MAKEFLAGS="" bash -c "parallel_installdeps_notest git://github.com/dbsrgits/cgi-speedycgi.git" + fi fi # generate the makefile which will have different deps depending on diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index 689e5af..6dfe36d 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -43,7 +43,7 @@ $( (sudo netstat -an46p || netstat -an46p) | grep -Pv '\s(CLOSING|(FIN|TIME|CLOS $(ps fuxa) = Environment -$(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC' | LC_ALL=C sort | cat -v) +$(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC|PATH|SHELL' | LC_ALL=C sort | cat -v) = Perl in use $(perl -V) @@ -161,6 +161,8 @@ parallel_installdeps_notest() { " } +export -f parallel_installdeps_notest run_or_err echo_err tstamp + installdeps() { if [[ -z "$@" ]] ; then return; fi diff --git a/t/52leaks.t b/t/52leaks.t index b427175..c6b64c2 100644 --- a/t/52leaks.t +++ b/t/52leaks.t @@ -519,12 +519,6 @@ assert_empty_weakregistry ($weak_registry); # this is ugly and dirty but we do not yet have a Test::Embedded or # similar -# set up -I -require Config; -$ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC); -($ENV{PATH}) = $ENV{PATH} =~ /(.+)/; - - my $persistence_tests; SKIP: { skip 'Test already in a persistent loop', 1 @@ -555,7 +549,17 @@ SKIP: { @{$persistence_tests->{PPerl}{cmd}}[ 1 .. $#{$persistence_tests->{PPerl}{cmd}} ], ]; - require IPC::Open2; + # set up -I + require Config; + $ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC); + + # adjust PATH for -T + if (length $ENV{PATH}) { + ( $ENV{PATH} ) = join ( $Config::Config{path_sep}, + map { length($_) ? File::Spec->rel2abs($_) : () } + split /\Q$Config::Config{path_sep}/, $ENV{PATH} + ) =~ /\A(.+)\z/; + } for my $type (keys %$persistence_tests) { SKIP: { unless (eval "require $type") { @@ -577,6 +581,8 @@ SKIP: { if system(@cmd); } + require IPC::Open2; + for (1,2,3) { note ("Starting run in persistent env ($type pass $_)"); IPC::Open2::open2(my $out, undef, @cmd);