]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/TestCommon.pm
lei import: force store, improve test diagnostics
[public-inbox.git] / lib / PublicInbox / TestCommon.pm
index ca165a045771b700ea55aef2572d6d500ed40943..72617a78efb3ae6c8e490b38e820da422e362e19 100644 (file)
@@ -17,7 +17,7 @@ BEGIN {
                run_script start_script key2sub xsys xsys_e xqx eml_load tick
                have_xapian_compact json_utf8 setup_public_inboxes create_inbox
                tcp_host_port test_lei lei lei_ok $lei_out $lei_err $lei_opt
-               test_httpd);
+               test_httpd xbail);
        require Test::More;
        my @methods = grep(!/\W/, @Test::More::EXPORT);
        eval(join('', map { "*$_=\\&Test::More::$_;" } @methods));
@@ -25,6 +25,8 @@ BEGIN {
        push @EXPORT, @methods;
 }
 
+sub xbail (@) { BAIL_OUT join(' ', map { ref ? (explain($_)) : ($_) } @_) }
+
 sub eml_load ($) {
        my ($path, $cb) = @_;
        open(my $fh, '<', $path) or die "open $path: $!";