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 439A01F5C2 for ; Fri, 15 Nov 2019 09:51:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 24/29] t/nntpd: use run_script for -init Date: Fri, 15 Nov 2019 09:50:55 +0000 Message-Id: <20191115095100.25633-25-e@80x24.org> In-Reply-To: <20191115095100.25633-1-e@80x24.org> References: <20191115095100.25633-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This only gives a 5% speedup or so, but anything helps. --- t/nntpd.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/nntpd.t b/t/nntpd.t index 462e2da9..b516ffd1 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -30,7 +30,6 @@ my $inboxdir = "$tmpdir/main.git"; my $group = 'test-nntpd'; my $addr = $group . '@example.com'; my $nntpd = 'blib/script/public-inbox-nntpd'; -my $init = 'blib/script/public-inbox-init'; SKIP: { skip "git 2.6+ required for V2Writable", 1 if $version == 1; use_ok 'PublicInbox::V2Writable'; @@ -52,9 +51,9 @@ my $ibx = { $ibx = PublicInbox::Inbox->new($ibx); { local $ENV{HOME} = $home; - my @cmd = ($init, $group, $inboxdir, 'http://example.com/', $addr); + my @cmd = ('-init', $group, $inboxdir, 'http://example.com/', $addr); push @cmd, "-V$version", '-Lbasic'; - is(system(@cmd), 0, 'init OK'); + ok(run_script(\@cmd), 'init OK'); is(system(qw(git config), "--file=$home/.public-inbox/config", "publicinbox.$group.newsgroup", $group), 0, 'enabled newsgroup');