From 71bcf84313d2cd1b4948b62ec5c2ff6063096d3c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 24 Nov 2019 00:22:36 +0000 Subject: t/perf-*.t: use $ENV{GIANT_INBOX_DIR} consistently 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. --- t/perf-msgview.t | 6 +++--- t/perf-nntpd.t | 8 ++++---- t/perf-threading.t | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 't') 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; -- cgit v1.2.3-24-ge0c7