diff options
author | Eric Wong <e@80x24.org> | 2019-11-15 09:50:53 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-16 11:05:23 +0000 |
commit | 5e76c9b79f8dd42c2ac989d8c67341637fe00553 (patch) | |
tree | 7d3e1a6ae136b62e3598440675cf544f28090f3b /t | |
parent | 30f1f693acd184797f3ad20ed6bedef6ee58f567 (diff) | |
download | public-inbox-5e76c9b79f8dd42c2ac989d8c67341637fe00553.tar.gz |
This only gives a small ~10% speedup, since -httpd still needs execve, but any speedup is welcome.
Diffstat (limited to 't')
-rw-r--r-- | t/httpd.t | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -22,7 +22,6 @@ my $group = 'test-httpd'; my $addr = $group . '@example.com'; my $cfgpfx = "publicinbox.$group"; my $httpd = 'blib/script/public-inbox-httpd'; -my $init = 'blib/script/public-inbox-init'; my $sock = tcp_server(); my $pid; use_ok 'PublicInbox::Git'; @@ -31,8 +30,8 @@ use_ok 'Email::MIME'; END { kill 'TERM', $pid if defined $pid }; { local $ENV{HOME} = $home; - ok(!system($init, $group, $maindir, 'http://example.com/', $addr), - 'init ran properly'); + my $cmd = [ '-init', $group, $maindir, 'http://example.com/', $addr ]; + ok(run_script($cmd), 'init ran properly'); # ensure successful message delivery { @@ -53,7 +52,7 @@ EOF $im->done($mime); } ok($sock, 'sock created'); - my $cmd = [ $httpd, '-W0', "--stdout=$out", "--stderr=$err" ]; + $cmd = [ $httpd, '-W0', "--stdout=$out", "--stderr=$err" ]; $pid = spawn_listener(undef, $cmd, [$sock]); my $host = $sock->sockhost; my $port = $sock->sockport; |