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-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 A56121FA00 for ; Mon, 15 Mar 2021 11:58:27 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 03/35] test_common: minor simplifications to setup_public_inboxes Date: Mon, 15 Mar 2021 12:57:54 +0100 Message-Id: <20210315115826.17591-4-e@80x24.org> In-Reply-To: <20210315115826.17591-1-e@80x24.org> References: <20210315115826.17591-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This will results in a small reduction in on-disk footprint by removing Xapian docdata and reduction in code by removing an unnecessary -index invocation. --- lib/PublicInbox/TestCommon.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 77306a6e..6ca69174 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -558,8 +558,8 @@ sub setup_public_inboxes () { local $ENV{PI_CONFIG} = $pi_config; for my $V (1, 2) { - run_script([qw(-init), "-V$V", "t$V", - '--newsgroup', "t.v$V", + run_script([qw(-init --skip-docdata), "-V$V", + '--newsgroup', "t.v$V", "t$V", "$test_home/t$V", "http://example.com/t$V", "t$V\@example.com" ]) or BAIL_OUT "init v$V"; } @@ -569,6 +569,7 @@ sub setup_public_inboxes () { my $seen = 0; $cfg->each_inbox(sub { my ($ibx) = @_; + $ibx->{-no_fsync} = 1; my $im = PublicInbox::InboxWritable->new($ibx)->importer(0); my $V = $ibx->version; my @eml = (glob('t/*.eml'), 't/data/0001.patch'); @@ -578,10 +579,6 @@ sub setup_public_inboxes () { $seen++; } $im->done; - if ($V == 1) { - run_script(['-index', $ibx->{inboxdir}]) or - BAIL_OUT 'index v1'; - } }); $seen or BAIL_OUT 'no imports'; open my $fh, '>', $stamp or BAIL_OUT "open $stamp: $!";