about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-24 00:22:36 +0000
committerEric Wong <e@80x24.org>2019-11-24 21:47:21 +0000
commit71bcf84313d2cd1b4948b62ec5c2ff6063096d3c (patch)
tree186f533d1993cc2bd86846494e84e3dfe23fa27a /t
parentfda0f1721b2dc1d2852388473f7da50ff230a3b6 (diff)
downloadpublic-inbox-71bcf84313d2cd1b4948b62ec5c2ff6063096d3c.tar.gz
It's more consistent with our current terminology and
"PI_DIR" is already used to override ~/.public-inbox/
(which holds "config" and possibly other files which affect
all inboxes for a particular user, but is not an inbox itself);
so stop advertising GIANT_PI_DIR in skip messages.
Diffstat (limited to 't')
-rw-r--r--t/perf-msgview.t6
-rw-r--r--t/perf-nntpd.t8
-rw-r--r--t/perf-threading.t8
3 files changed, 11 insertions, 11 deletions
diff --git a/t/perf-msgview.t b/t/perf-msgview.t
index 492ed487..22d8ce20 100644
--- a/t/perf-msgview.t
+++ b/t/perf-msgview.t
@@ -8,8 +8,8 @@ use PublicInbox::Inbox;
 use PublicInbox::View;
 require './t/common.perl';
 
-my $pi_dir = $ENV{GIANT_PI_DIR};
-plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir;
+my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR};
+plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir;
 
 my @cat = qw(cat-file --buffer --batch-check --batch-all-objects);
 if (require_git(2.19, 1)) {
@@ -20,7 +20,7 @@ if (require_git(2.19, 1)) {
 }
 
 use_ok 'Plack::Util';
-my $ibx = PublicInbox::Inbox->new({ inboxdir => $pi_dir, name => 'name' });
+my $ibx = PublicInbox::Inbox->new({ inboxdir => $inboxdir, name => 'name' });
 my $git = $ibx->git;
 my $fh = $git->popen(@cat);
 my $vec = '';
diff --git a/t/perf-nntpd.t b/t/perf-nntpd.t
index 6f891ddb..5a176e08 100644
--- a/t/perf-nntpd.t
+++ b/t/perf-nntpd.t
@@ -6,8 +6,8 @@ use Test::More;
 use Benchmark qw(:all :hireswallclock);
 use PublicInbox::Inbox;
 use Net::NNTP;
-my $pi_dir = $ENV{GIANT_PI_DIR};
-plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir;
+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';
@@ -17,7 +17,7 @@ if (($ENV{NNTP_TEST_URL} || '') =~ m!\Anntp://([^/]+)/([^/]+)\z!) {
         $host_port .= ":119" unless index($host_port, ':') > 0;
 } else {
         $group = 'inbox.test.perf.nntpd';
-        my $ibx = { inboxdir => $pi_dir, newsgroup => $group };
+        my $ibx = { inboxdir => $inboxdir, newsgroup => $group };
         $ibx = PublicInbox::Inbox->new($ibx);
         my $tmpdir;
         ($tmpdir, $tmp_obj) = tmpdir();
@@ -28,7 +28,7 @@ if (($ENV{NNTP_TEST_URL} || '') =~ m!\Anntp://([^/]+)/([^/]+)\z!) {
                 print $fh <<"" or die "print $pi_config: $!";
 [publicinbox "test"]
         newsgroup = $group
-        inboxdir = $pi_dir
+        inboxdir = $inboxdir
         address = test\@example.com
 
                 close $fh or die "close($pi_config): $!";
diff --git a/t/perf-threading.t b/t/perf-threading.t
index 8d28b3a0..1038bda5 100644
--- a/t/perf-threading.t
+++ b/t/perf-threading.t
@@ -7,12 +7,12 @@ use warnings;
 use Test::More;
 use Benchmark qw(:all);
 use PublicInbox::Inbox;
-my $pi_dir = $ENV{GIANT_PI_DIR};
-plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir;
-my $ibx = PublicInbox::Inbox->new({ inboxdir => $pi_dir });
+my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR};
+plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir;
+my $ibx = PublicInbox::Inbox->new({ inboxdir => $inboxdir });
 eval { require PublicInbox::Search };
 my $srch = $ibx->search;
-plan skip_all => "$pi_dir not configured for search $0 $@" unless $srch;
+plan skip_all => "$inboxdir not configured for search $0 $@" unless $srch;
 
 require PublicInbox::View;