about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-03 07:57:29 +0000
committerEric Wong <e@80x24.org>2019-10-05 05:18:28 +0000
commit845d45f8b1c33a4b5fb559101ca53238b4dfc1aa (patch)
treeed06688eb5f31775d24566e0315ebd3bdbffc604
parentd33d07a2de6b2e5c3d507ee5fd7d0c9af2ae27a5 (diff)
downloadpublic-inbox-845d45f8b1c33a4b5fb559101ca53238b4dfc1aa.tar.gz
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 <hi@alyssa.is>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Tested-by: Alyssa Ross <hi@alyssa.is>
Link: https://public-inbox.org/meta/878sq2hd08.fsf@alyssa.is/
-rw-r--r--t/search.t3
1 files changed, 2 insertions, 1 deletions
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");