]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/nntpd: use run_script for -init
authorEric Wong <e@80x24.org>
Fri, 15 Nov 2019 09:50:55 +0000 (09:50 +0000)
committerEric Wong <e@80x24.org>
Sat, 16 Nov 2019 11:05:23 +0000 (11:05 +0000)
This only gives a 5% speedup or so, but anything helps.

t/nntpd.t

index 462e2da97b9922c6c165c5e59977c543fd84e472..b516ffd1b249c358696d301bf6df079e6466f9f6 100644 (file)
--- 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');