diff options
author | Eric Wong <e@80x24.org> | 2021-03-28 00:17:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-28 02:43:54 +0000 |
commit | 29792d70a5d8305f68521664a7fa2e0fe54ff291 (patch) | |
tree | 441c0aafeef6cf9639360308371846cdaf003528 /xt | |
parent | ba6f3d8379fb9ee8d0f18e3e0d6d77386daf79c9 (diff) | |
download | public-inbox-29792d70a5d8305f68521664a7fa2e0fe54ff291.tar.gz |
This makes it easier to manage test dependencies on systems where optional stuff isn't installed. This fixes some lei tests which didn't check for Plack before starting -httpd, and ensures Parse::RecDescent is available for -imapd in case Mail::IMAPClient stops using it.
Diffstat (limited to 'xt')
-rw-r--r-- | xt/imapd-mbsync-oimap.t | 4 | ||||
-rw-r--r-- | xt/imapd-validate.t | 4 | ||||
-rw-r--r-- | xt/mem-imapd-tls.t | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/xt/imapd-mbsync-oimap.t b/xt/imapd-mbsync-oimap.t index 6635e2b4..0baf5b4c 100644 --- a/xt/imapd-mbsync-oimap.t +++ b/xt/imapd-mbsync-oimap.t @@ -3,11 +3,11 @@ # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # ensure mbsync and offlineimap compatibility use strict; -use Test::More; +use v5.10.1; use File::Path qw(mkpath); use PublicInbox::TestCommon; use PublicInbox::Spawn qw(which spawn); -require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address)); +require_mods(qw(-imapd)); my $inboxdir = $ENV{GIANT_INBOX_DIR}; (defined($inboxdir) && -d $inboxdir) or plan skip_all => "GIANT_INBOX_DIR not defined for $0"; diff --git a/xt/imapd-validate.t b/xt/imapd-validate.t index 3a229883..5d27d2a0 100644 --- a/xt/imapd-validate.t +++ b/xt/imapd-validate.t @@ -3,7 +3,7 @@ # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # Expensive test to validate compression and TLS. use strict; -use Test::More; +use v5.10.1; use Symbol qw(gensym); use PublicInbox::DS qw(now); use POSIX qw(_exit); @@ -15,7 +15,7 @@ my $BATCH = $ENV{TEST_BATCH} // 100; my $REPEAT = $ENV{TEST_REPEAT} // 1; diag "TEST_BATCH=$BATCH TEST_REPEAT=$REPEAT"; -require_mods(qw(Mail::IMAPClient Email::Address::XS||Mail::Address)); +require_mods(qw(Mail::IMAPClient -imapd)); my $imap_client = 'Mail::IMAPClient'; my $can_compress = $imap_client->can('compress'); if ($can_compress) { # hope this gets fixed upstream, soon diff --git a/xt/mem-imapd-tls.t b/xt/mem-imapd-tls.t index 99d8cb0d..bd75ef45 100644 --- a/xt/mem-imapd-tls.t +++ b/xt/mem-imapd-tls.t @@ -4,13 +4,12 @@ # Idle client memory usage test, particularly after EXAMINE when # Message Sequence Numbers are loaded use strict; -use Test::More; +use v5.10.1; use Socket qw(SOCK_STREAM IPPROTO_TCP SOL_SOCKET); use PublicInbox::TestCommon; use PublicInbox::Syscall qw(:epoll); use PublicInbox::DS; -require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address - Parse::RecDescent)); +require_mods(qw(-imapd)); my $inboxdir = $ENV{GIANT_INBOX_DIR}; my $TEST_TLS; SKIP: { |