X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FTestCommon.pm;h=d36a63aa29aaa310c4b647db0e22150b1a3bfaa4;hb=29792d70a5d8305f68521664a7fa2e0fe54ff291;hp=72617a78efb3ae6c8e490b38e820da422e362e19;hpb=ba6f3d8379fb9ee8d0f18e3e0d6d77386daf79c9;p=public-inbox.git diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 72617a78..d36a63aa 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -107,20 +107,29 @@ sub require_mods { my $maybe = pop @mods if $mods[-1] =~ /\A[0-9]+\z/; my @need; while (my $mod = shift(@mods)) { + if ($mod eq 'lei') { + require_git(2.6, $maybe ? $maybe : ()); + push @mods, qw(DBD::SQLite Search::Xapian); + $mod = 'json'; # fall-through + } if ($mod eq 'json') { - $mod = 'Cpanel::JSON::XS||JSON::MaybeXS||'. - 'JSON||JSON::PP' + $mod = 'Cpanel::JSON::XS||JSON::MaybeXS||JSON||JSON::PP' + } elsif ($mod eq '-httpd') { + push @mods, qw(Plack::Builder Plack::Util); + next; + } elsif ($mod eq '-imapd') { + push @mods, qw(Parse::RecDescent DBD::SQLite + Email::Address::XS||Mail::Address); + next; + } elsif ($mod eq '-nntpd') { + push @mods, qw(DBD::SQLite); + next; } if ($mod eq 'Search::Xapian') { if (eval { require PublicInbox::Search } && PublicInbox::Search::load_xapian()) { next; } - } elsif ($mod eq 'Search::Xapian::WritableDatabase') { - if (eval { require PublicInbox::SearchIdx } && - PublicInbox::SearchIdx::load_xapian_writable()){ - next; - } } elsif (index($mod, '||') >= 0) { # "Foo||Bar" my $ok; for my $m (split(/\Q||\E/, $mod)) {