From 6e07def560b211d9a1a3221862e72b7aeb4a31b3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Apr 2020 23:19:37 +0000 Subject: testcommon: spawn-aware system() and qx[] workalikes Barely noticeable on Linux, but this gives a 1-2% speedup on a FreeBSD 11.3 VM and lets us use built-in redirects rather than relying on /bin/sh. --- t/httpd.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/httpd.t') diff --git a/t/httpd.t b/t/httpd.t index 11511c73..61aec3b4 100644 --- a/t/httpd.t +++ b/t/httpd.t @@ -64,22 +64,22 @@ EOF is($conn->read($buf, 1), 0, "EOF"); } - is(system(qw(git clone -q --mirror), + is(xsys(qw(git clone -q --mirror), "http://$host:$port/$group", "$tmpdir/clone.git"), 0, 'smart clone successful'); # ensure dumb cloning works, too: - is(system('git', "--git-dir=$maindir", + is(xsys('git', "--git-dir=$maindir", qw(config http.uploadpack false)), 0, 'disable http.uploadpack'); - is(system(qw(git clone -q --mirror), + is(xsys(qw(git clone -q --mirror), "http://$host:$port/$group", "$tmpdir/dumb.git"), 0, 'clone successful'); ok($td->kill, 'killed httpd'); $td->join; - is(system('git', "--git-dir=$tmpdir/clone.git", + is(xsys('git', "--git-dir=$tmpdir/clone.git", qw(fsck --no-verbose)), 0, 'fsck on cloned directory successful'); } -- cgit v1.2.3-24-ge0c7