From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4701D1FAD4 for ; Sun, 24 Nov 2019 00:22:43 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 16/17] t/perf-*.t: use $ENV{GIANT_INBOX_DIR} consistently Date: Sun, 24 Nov 2019 00:22:36 +0000 Message-Id: <20191124002237.15713-17-e@80x24.org> In-Reply-To: <20191124002237.15713-1-e@80x24.org> References: <20191124002237.15713-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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;