diff options
author | Eric Wong <e@80x24.org> | 2021-02-09 07:09:37 -0100 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-10 06:59:10 +0000 |
commit | 04b73104416e4734b3a01e47525119cac867065a (patch) | |
tree | 90d90646330fe572e0dc96317fdc9eb2003c5d5f /lib/PublicInbox/TestCommon.pm | |
parent | 0c32dadfb508e087111fb4d685add5a22e5f6cd1 (diff) | |
download | public-inbox-04b73104416e4734b3a01e47525119cac867065a.tar.gz |
DESTROY callbacks can clobber $?, so we must take care to preserve it when exiting. We'll also try to make an effort to ensure better DESTROY ordering and delete as much as possible before x_it finishes. We also need to load PublicInbox::Config when setting up public inboxes.
Diffstat (limited to 'lib/PublicInbox/TestCommon.pm')
-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 53f13437..63d45ac3 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -541,7 +541,6 @@ sub setup_public_inboxes () { my $end = $lk->lock_for_scope; return @ret if -f $stamp; - require PublicInbox::InboxWritable; local $ENV{PI_CONFIG} = $pi_config; for my $V (1, 2) { run_script([qw(-init), "-V$V", "t$V", @@ -549,6 +548,8 @@ sub setup_public_inboxes () { "$test_home/t$V", "http://example.com/t$V", "t$V\@example.com" ]) or BAIL_OUT "init v$V"; } + require PublicInbox::Config; + require PublicInbox::InboxWritable; my $cfg = PublicInbox::Config->new; my $seen = 0; $cfg->each_inbox(sub { |