Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions sbin/rt-test-dependencies.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ GetOptions(
'siteinstall!',
'help|h',

'testinstall!',

# No-ops, for back-compat
'v|verbose', 'with-ICAL', 'with-DASHBOARDS', 'with-USERLOGO',
);
Expand All @@ -99,6 +101,7 @@ my %default = (
'with-EXTERNALAUTH' => @RT_EXTERNALAUTH@,
'with-S3' => (uc(q{@ATTACHMENT_STORE@}) eq 'S3'),
'with-DROPBOX' => (uc(q{@ATTACHMENT_STORE@}) eq 'DROPBOX'),
'testinstall' => 1
);

$default{"with-".uc("@DB_TYPE@")} = 1 unless grep {$args{"with-$_"}} qw/MYSQL PG SQLITE ORACLE/;
Expand Down Expand Up @@ -396,8 +399,13 @@ sub resolve_dep {
if $args{siteinstall};
local $CPAN::Config->{makepl_arg} = $installdirs;

my $rv = eval { require CPAN; CPAN::Shell->install($module) };
return $rv unless $@;
my $rv;
if ($args{'testinstall'}) {
$rv = eval { require CPAN; CPAN::Shell->install($module) };
} else {
$rv = eval { require CPAN; CPAN::Shell->notest('install', $module) };
}
return $rv unless $@;
}

if ( $ext =~ /\%s/ ) {
Expand Down