about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-15 09:50:53 +0000
committerEric Wong <e@80x24.org>2019-11-16 11:05:23 +0000
commit5e76c9b79f8dd42c2ac989d8c67341637fe00553 (patch)
tree7d3e1a6ae136b62e3598440675cf544f28090f3b
parent30f1f693acd184797f3ad20ed6bedef6ee58f567 (diff)
downloadpublic-inbox-5e76c9b79f8dd42c2ac989d8c67341637fe00553.tar.gz
This only gives a small ~10% speedup, since -httpd still
needs execve, but any speedup is welcome.
-rw-r--r--t/httpd.t7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/httpd.t b/t/httpd.t
index 15984a78..e7527ed6 100644
--- a/t/httpd.t
+++ b/t/httpd.t
@@ -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;