From: Eric Wong <e@yhbt.net>
To: meta@public-inbox.org
Subject: [PATCH 2/2] tests: require git 2.6+ in more places
Date: Sat, 20 Jun 2020 00:13:02 +0000 [thread overview]
Message-ID: <20200620001302.1150-3-e@yhbt.net> (raw)
In-Reply-To: <20200620001302.1150-1-e@yhbt.net>
We also need to check for git 2.6 earlier in each test case,
before any other TAP output is emitted to avoid confusing the
TAP consumers.
---
t/git.t | 3 ++-
t/imap.t | 2 +-
t/imapd.t | 2 +-
t/inbox_idle.t | 2 +-
t/psgi_bad_mids.t | 1 +
t/psgi_multipart_not.t | 1 +
t/psgi_scan_all.t | 1 +
7 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/t/git.t b/t/git.t
index 228df90f..dfd7173a 100644
--- a/t/git.t
+++ b/t/git.t
@@ -84,7 +84,8 @@ if (1) {
ok($gcf->packed_bytes > 0, 'packed size is positive');
}
-if ('alternates reloaded') {
+SKIP: {
+ require_git(2.6, 7) or skip('need git 2.6+ for --batch-all-objects', 7);
my ($alt, $alt_obj) = tmpdir();
my $hash_obj = [ 'git', "--git-dir=$alt", qw(hash-object -w --stdin) ];
PublicInbox::Import::init_bare($alt);
diff --git a/t/imap.t b/t/imap.t
index 95bda4fa..5a251c6b 100644
--- a/t/imap.t
+++ b/t/imap.t
@@ -5,11 +5,11 @@
use strict;
use Test::More;
use PublicInbox::TestCommon;
+require_git 2.6;
require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address
Parse::RecDescent));
require_ok 'PublicInbox::IMAP';
require_ok 'PublicInbox::IMAPD';
-require_git 2.6;
my ($tmpdir, $for_destroy) = tmpdir();
my $cfgfile = "$tmpdir/config";
diff --git a/t/imapd.t b/t/imapd.t
index f9d93448..ffa195d5 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -105,7 +105,7 @@ my @orig_list = @raw = $mic->list;
like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/,
'got an inbox');
like($raw[-1], qr/^\S+ OK /, 'response ended with OK');
-is(scalar(@raw), scalar(@V) + 4, 'default LIST response');
+is(scalar(@raw), scalar(@V) * 2 + 2, 'default LIST response');
@raw = $mic->list('', 'inbox.i1');
is(scalar(@raw), 2, 'limited LIST response');
like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/,
diff --git a/t/inbox_idle.t b/t/inbox_idle.t
index 6bd56113..f754e0fc 100644
--- a/t/inbox_idle.t
+++ b/t/inbox_idle.t
@@ -4,10 +4,10 @@
use Test::More;
use PublicInbox::TestCommon;
use PublicInbox::Config;
+require_git 2.6;
require_mods(qw(DBD::SQLite));
require PublicInbox::SearchIdx;
use_ok 'PublicInbox::InboxIdle';
-require_git('2.6');
use PublicInbox::InboxWritable;
my ($tmpdir, $for_destroy) = tmpdir();
diff --git a/t/psgi_bad_mids.t b/t/psgi_bad_mids.t
index 81bd9356..70393573 100644
--- a/t/psgi_bad_mids.t
+++ b/t/psgi_bad_mids.t
@@ -8,6 +8,7 @@ use PublicInbox::Config;
use PublicInbox::TestCommon;
my @mods = qw(DBD::SQLite HTTP::Request::Common Plack::Test
URI::Escape Plack::Builder PublicInbox::WWW);
+require_git 2.6;
require_mods(@mods);
use_ok($_) for @mods;
use_ok 'PublicInbox::WWW';
diff --git a/t/psgi_multipart_not.t b/t/psgi_multipart_not.t
index e36820f4..9b7fb4d0 100644
--- a/t/psgi_multipart_not.t
+++ b/t/psgi_multipart_not.t
@@ -6,6 +6,7 @@ use Test::More;
use PublicInbox::Eml;
use PublicInbox::Config;
use PublicInbox::TestCommon;
+require_git 2.6;
my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common
Plack::Test URI::Escape Plack::Builder Plack::Test);
require_mods(@mods);
diff --git a/t/psgi_scan_all.t b/t/psgi_scan_all.t
index 46eb489f..c8cb2409 100644
--- a/t/psgi_scan_all.t
+++ b/t/psgi_scan_all.t
@@ -7,6 +7,7 @@ use PublicInbox::Eml;
use PublicInbox::Config;
use PublicInbox::TestCommon;
my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape DBD::SQLite);
+require_git 2.6;
require_mods(@mods);
use_ok 'PublicInbox::V2Writable';
foreach my $mod (@mods) { use_ok $mod; }
prev parent reply other threads:[~2020-06-20 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 0:13 [PATCH 0/2] test fixes for older systems Eric Wong
2020-06-20 0:13 ` [PATCH 1/2] testcommon: require IO::Socket::SSL >= 2.007 Eric Wong
2020-06-20 0:13 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200620001302.1150-3-e@yhbt.net \
--to=e@yhbt.net \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).