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;
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);
}
die "FAIL: ",join(' ', $key, @argv), ": $!\n";
}
}
+ require PublicInbox::AutoReap;
my $td = PublicInbox::AutoReap->new($pid);
$td->{-extra} = $tail;
$td;
my %opt = @_;
require PublicInbox::Lock;
require PublicInbox::InboxWritable;
+ require PublicInbox::Import;
my ($base) = ($0 =~ m!\b([^/]+)\.[^\.]+\z!);
- my $dir = "t/data-gen/$base.$ident";
+ my ($db) = (PublicInbox::Import::default_branch() =~ m!([^/]+)\z!);
+ my $dir = "t/data-gen/$base.$ident-$db";
my $new = !-d $dir;
if ($new) {
mkdir $dir; # may race