From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/3] t/lei-*.t: guard setup_public_inboxes with test_lei
Date: Sun, 12 Sep 2021 08:42:17 +0000 [thread overview]
Message-ID: <20210912084219.11609-2-e@80x24.org> (raw)
In-Reply-To: <20210912084219.11609-1-e@80x24.org>
This ensures tests are skipped properly if SQLite or Xapian
are missing and don't bail out.
---
t/lei-auto-watch.t | 3 +--
t/lei-up.t | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/lei-auto-watch.t b/t/lei-auto-watch.t
index 3b0c1b10..e5e132eb 100644
--- a/t/lei-auto-watch.t
+++ b/t/lei-auto-watch.t
@@ -3,14 +3,13 @@
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict; use v5.10.1; use PublicInbox::TestCommon;
use File::Basename qw(basename);
-my ($ro_home, $cfg_path) = setup_public_inboxes;
my $have_fast_inotify = eval { require Linux::Inotify2 } ||
eval { require IO::KQueue };
-
$have_fast_inotify or
diag("$0 IO::KQueue or Linux::Inotify2 missing, test will be slow");
test_lei(sub {
+ my ($ro_home, $cfg_path) = setup_public_inboxes;
my $x = "$ENV{HOME}/x";
my $y = "$ENV{HOME}/y";
lei_ok qw(add-external), "$ro_home/t1";
diff --git a/t/lei-up.t b/t/lei-up.t
index c6f31c74..6b34774d 100644
--- a/t/lei-up.t
+++ b/t/lei-up.t
@@ -2,9 +2,9 @@
# Copyright all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict; use v5.10.1; use PublicInbox::TestCommon;
-my ($ro_home, $cfg_path) = setup_public_inboxes;
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
test_lei(sub {
+ my ($ro_home, $cfg_path) = setup_public_inboxes;
my $s = eml_load('t/plack-qp.eml')->as_string;
lei_ok [qw(import -q -F eml -)], undef, { 0 => \$s, %$lei_opt };
lei_ok qw(q z:0.. -f mboxcl2 -o), "$ENV{HOME}/a.mbox.gz";
next prev parent reply other threads:[~2021-09-12 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-12 8:42 [PATCH 0/3] test dependency fixes for minimal installs Eric Wong
2021-09-12 8:42 ` Eric Wong [this message]
2021-09-12 8:42 ` [PATCH 2/3] lei sucks: allow it to work without SQLite Eric Wong
2021-09-12 8:42 ` [PATCH 3/3] test_common: only print $@ for Gcf2 failure Eric Wong
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=20210912084219.11609-2-e@80x24.org \
--to=e@80x24.org \
--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).