diff options
author | Eric Wong <e@80x24.org> | 2021-10-19 09:33:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-19 17:29:14 +0000 |
commit | b05caf7df04d7f8879a46e5c03693570351e2577 (patch) | |
tree | 59a54d0ae60929318bad417a3ec17dcb6ec7a62d /lib/PublicInbox | |
parent | 8377d44046ade5becb21f71e4d1d68dd6ae2bbf0 (diff) | |
download | public-inbox-b05caf7df04d7f8879a46e5c03693570351e2577.tar.gz |
This might speed up non-daemon-using tests.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/TestCommon.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 83577999..fb0d5a4e 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -6,7 +6,6 @@ package PublicInbox::TestCommon; use strict; use parent qw(Exporter); use v5.10.1; -use PublicInbox::AutoReap; use Fcntl qw(FD_CLOEXEC F_SETFD F_GETFD :seek); use POSIX qw(dup2); use IO::Socket::INET; @@ -430,6 +429,7 @@ sub tail_f (@) { require PublicInbox::Spawn; my $pid = PublicInbox::Spawn::spawn($cmd, undef, { 1 => 2 }); wait_for_tail($pid, scalar @_); + require PublicInbox::AutoReap; PublicInbox::AutoReap->new($pid, \&wait_for_tail); } @@ -493,6 +493,7 @@ sub start_script { die "FAIL: ",join(' ', $key, @argv), ": $!\n"; } } + require PublicInbox::AutoReap; my $td = PublicInbox::AutoReap->new($pid); $td->{-extra} = $tail; $td; |