X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Frt-test-dependencies.in;h=6fa29761e82cfcc5c98c8eea5d616a2820bc6c7d;hb=6e9e3f39f0b719a53400b28b8e9784197cb6ef92;hp=5ce918b025dfe1f6fdcab2dd62ccc0715cda4e86;hpb=a60615bf7bde77aa2b9faf3fc268c149eecdb5ab;p=freeside.git diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in index 5ce918b02..6fa29761e 100644 --- a/rt/sbin/rt-test-dependencies.in +++ b/rt/sbin/rt-test-dependencies.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -52,11 +52,16 @@ # use strict; +use warnings; no warnings qw(numeric redefine); use Getopt::Long; +use Cwd qw(abs_path); my %args; my %deps; my @orig_argv = @ARGV; +# Save our path because installers or tests can change cwd +my $script_path = abs_path($0); + GetOptions( \%args, 'v|verbose', 'install!', 'with-MYSQL', @@ -96,16 +101,16 @@ my %default = ( 'with-CORE' => 1, 'with-CLI' => 1, 'with-MAILGATE' => 1, - 'with-DEV' => @RT_DEVEL_MODE@, - 'with-GPG' => @RT_GPG@, + 'with-DEVELOPER' => @RT_DEVELOPER@, + 'with-GPG' => @RT_GPG_DEPS@, + 'with-SMIME' => @RT_SMIME_DEPS@, 'with-ICAL' => 1, 'with-SMTP' => 1, 'with-GRAPHVIZ' => @RT_GRAPHVIZ@, 'with-GD' => @RT_GD@, 'with-DASHBOARDS' => 1, 'with-USERLOGO' => 1, - 'with-SSL-MAILGATE' => @RT_SSL_MAILGATE@, - 'with-HTML-DOC' => @RT_DEVEL_MODE@, + 'with-HTML-DOC' => @RT_DEVELOPER@, ); $args{$_} = $default{$_} foreach grep !exists $args{$_}, keys %default; @@ -176,6 +181,12 @@ sub text_to_hash { return %hash; } +sub set_dep { + my ($name, $module, $version) = @_; + my %list = @{$deps{$name}}; + $list{$module} = ($version || ''); + $deps{$name} = [ %list ]; +} $deps{'CORE'} = [ text_to_hash( << '.') ]; Class::Accessor 0.34 @@ -248,6 +259,8 @@ Plack 0.9971 Plack::Handler::Starlet CGI::Emulate::PSGI . +set_dep( PSGI => CGI => 4.00 ) if $] > 5.019003; + $deps{'MAILGATE'} = [ text_to_hash( << '.') ]; Getopt::Long @@ -260,7 +273,6 @@ Crypt::SSLeay Net::SSL LWP::UserAgent 6.0 LWP::Protocol::https -Mozilla::CA . $deps{'CLI'} = [ text_to_hash( << '.') ]; @@ -291,8 +303,10 @@ Test::Builder 0.90 # needed for is_passing Test::MockTime Log::Dispatch::Perl Test::WWW::Mechanize::PSGI -Plack::Middleware::Test::StashWarnings 0.06 +Plack::Middleware::Test::StashWarnings 0.08 Test::LongString +Test::NoWarnings +Locale::PO . $deps{'FASTCGI'} = [ text_to_hash( << '.') ]; @@ -319,6 +333,7 @@ DBD::Oracle . $deps{'POSTGRESQL'} = [ text_to_hash( << '.') ]; +DBIx::SearchBuilder 1.66 DBD::Pg 1.43 . @@ -340,7 +355,7 @@ Net::SMTP . $deps{'DASHBOARDS'} = [ text_to_hash( << '.') ]; -HTML::RewriteAttributes 0.04 +HTML::RewriteAttributes 0.05 MIME::Types URI 1.59 . @@ -361,13 +376,14 @@ Convert::Color . $deps{'HTML-DOC'} = [ text_to_hash( <<'.') ]; -Pod::Simple 3.17 +Pod::Simple 3.24 HTML::Entities . my %AVOID = ( 'DBD::Oracle' => [qw(1.23)], 'Email::Address' => [qw(1.893 1.894)], + 'Devel::StackTrace' => [qw(1.28 1.29)], ); if ($args{'download'}) { @@ -413,7 +429,7 @@ foreach my $type (sort grep $args{$_}, keys %args) { } if ( $args{'install'} && keys %Missing_By_Type ) { - exec($0, @orig_argv, '--no-install'); + exec($script_path, @orig_argv, '--no-install'); } else { conclude(%Missing_By_Type); @@ -445,6 +461,7 @@ sub test_dep { print $module, ': ', $version || 0, "\n"; } else { + no warnings 'deprecated'; eval "use $module $version ()"; if ( my $error = $@ ) { return 0 unless wantarray;