From 845d45f8b1c33a4b5fb559101ca53238b4dfc1aa Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Oct 2019 07:57:29 +0000 Subject: [PATCH] t/search: bail out on `git init --shared' failures We can save future testers some time if we bail out early on "git init --shared" failures, since things like seccomp or non-POSIX FSes would trigger failures. BAIL_OUT has been in Test::Simple since Perl v5.10.0, so it's old-enough to call for our purposes. Thanks-to: Alyssa Ross Reviewed-by: Alyssa Ross Tested-by: Alyssa Ross Link: https://public-inbox.org/meta/878sq2hd08.fsf@alyssa.is/ --- t/search.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/search.t b/t/search.t index 830c668e..a728d79f 100644 --- a/t/search.t +++ b/t/search.t @@ -17,7 +17,8 @@ my $git_dir = "$tmpdir/a.git"; my $ibx = PublicInbox::Inbox->new({ mainrepo => $git_dir }); my ($root_id, $last_id); -is(0, system(qw(git init --shared -q --bare), $git_dir), "git init (main)"); +is(0, system(qw(git init --shared -q --bare), $git_dir), "git init (main)") + or BAIL_OUT("`git init --shared' failed, weird FS or seccomp?"); eval { PublicInbox::Search->new($ibx)->xdb }; ok($@, "exception raised on non-existent DB"); -- 2.44.0