* [PATCH] tests: skip properly with git <2.6
@ 2021-02-10 21:50 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-02-10 21:50 UTC (permalink / raw)
To: meta
Tested with git 1.8.3.1 on CentOS 7.x
`plan skip_all => ...' doesn't work after some tests have run,
we have to call skip() instead.
---
lib/PublicInbox/TestCommon.pm | 2 +-
t/nntpd.t | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index f5b3fae..d6b7d20 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -476,7 +476,7 @@ sub test_lei {
SKIP: {
my ($cb) = pop @_;
my $test_opt = shift // {};
- require_git(2.6) or skip('git 2.6+ required for lei test', 2);
+ require_git(2.6, 1) or skip('git 2.6+ required for lei test', 2);
require_mods(qw(json DBD::SQLite Search::Xapian), 2);
require PublicInbox::Config;
delete local $ENV{XDG_DATA_HOME};
diff --git a/t/nntpd.t b/t/nntpd.t
index 6c10013..18aaccb 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -13,11 +13,11 @@ use Net::NNTP;
use Sys::Hostname;
use POSIX qw(_exit);
use Digest::SHA;
-use_ok 'PublicInbox::Msgmap';
# t/nntpd-v2.t wraps this for v2
my $version = $ENV{PI_TEST_VERSION} || 1;
require_git('2.6') if $version == 2;
+use_ok 'PublicInbox::Msgmap';
my $lsof = which('lsof');
my $fast_idle = eval { require Linux::Inotify2; 1 } //
eval { require IO::KQueue; 1 };
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-10 21:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 21:50 [PATCH] tests: skip properly with git <2.6 Eric Wong
unofficial mirror of meta@public-inbox.org
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhetil.org/meta
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
meta@public-inbox.org
public-inbox-index meta
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
nntp://news.gmane.io/gmane.mail.public-inbox.general
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git