diff options
author | Eric Wong <e@80x24.org> | 2019-12-18 03:36:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-12-19 04:07:45 +0000 |
commit | 3c313f9034aac96182e2efdc2f92c40803626f32 (patch) | |
tree | 5e105f4b698da5695c22edea1a6e2033e0ce78e4 /xt | |
parent | 684d26cecc0891261783be179909b0e434692b25 (diff) | |
download | public-inbox-3c313f9034aac96182e2efdc2f92c40803626f32.tar.gz |
We want to be able to use run_script with *.t files, so t/common.perl putting subs into the top-level "main" namespace won't work. Instead, make it a module which uses Exporter like other libraries.
Diffstat (limited to 'xt')
-rw-r--r-- | xt/git-http-backend.t | 2 | ||||
-rw-r--r-- | xt/nntpd-validate.t | 2 | ||||
-rw-r--r-- | xt/perf-msgview.t | 2 | ||||
-rw-r--r-- | xt/perf-nntpd.t | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/xt/git-http-backend.t b/xt/git-http-backend.t index a927d89e..5f96369f 100644 --- a/xt/git-http-backend.t +++ b/xt/git-http-backend.t @@ -7,7 +7,7 @@ use strict; use warnings; use Test::More; use POSIX qw(setsid); -require './t/common.perl'; +use PublicInbox::TestCommon; my $git_dir = $ENV{GIANT_GIT_DIR}; plan 'skip_all' => 'GIANT_GIT_DIR not defined' unless $git_dir; diff --git a/xt/nntpd-validate.t b/xt/nntpd-validate.t index 39108639..c82d46e2 100644 --- a/xt/nntpd-validate.t +++ b/xt/nntpd-validate.t @@ -29,7 +29,7 @@ my $key = 'certs/server-key.pem'; if ($test_tls && !-r $key || !-r $cert) { plan skip_all => "certs/ missing for $0, run $^X ./certs/create-certs.perl"; } -require './t/common.perl'; +use PublicInbox::TestCommon; my ($tmpdir, $ftd) = tmpdir(); $File::Temp::KEEP_ALL = !!$ENV{TEST_KEEP_TMP}; my (%OPT, $td, $host_port, $group); diff --git a/xt/perf-msgview.t b/xt/perf-msgview.t index 22d8ce20..11bd3a5d 100644 --- a/xt/perf-msgview.t +++ b/xt/perf-msgview.t @@ -6,7 +6,7 @@ use Test::More; use Benchmark qw(:all); use PublicInbox::Inbox; use PublicInbox::View; -require './t/common.perl'; +use PublicInbox::TestCommon; my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR}; plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir; diff --git a/xt/perf-nntpd.t b/xt/perf-nntpd.t index 5a176e08..df5ecb41 100644 --- a/xt/perf-nntpd.t +++ b/xt/perf-nntpd.t @@ -10,7 +10,7 @@ my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR}; plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless defined($inboxdir); eval { require PublicInbox::Search }; my ($host_port, $group, %opts, $s, $td, $tmp_obj); -require './t/common.perl'; +use PublicInbox::TestCommon; if (($ENV{NNTP_TEST_URL} || '') =~ m!\Anntp://([^/]+)/([^/]+)\z!) { ($host_port, $group) = ($1, $2); |