user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/3] t/lei-*.t: guard setup_public_inboxes with test_lei
  2021-09-12  8:42  5% [PATCH 0/3] test dependency fixes for minimal installs Eric Wong
@ 2021-09-12  8:42  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-09-12  8:42 UTC (permalink / raw)
  To: meta

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";

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] test dependency fixes for minimal installs
@ 2021-09-12  8:42  5% Eric Wong
  2021-09-12  8:42  7% ` [PATCH 1/3] t/lei-*.t: guard setup_public_inboxes with test_lei Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-09-12  8:42 UTC (permalink / raw)
  To: meta

Everything that worked in 2014 when this project started
should still work today without new dependencies.

Eric Wong (3):
  t/lei-*.t: guard setup_public_inboxes with test_lei
  lei sucks: allow it to work without SQLite
  test_common: only print $@ for Gcf2 failure

 lib/PublicInbox/LeiSucks.pm   |  4 ++--
 lib/PublicInbox/TestCommon.pm | 14 ++++++++------
 t/lei-auto-watch.t            |  3 +--
 t/lei-up.t                    |  2 +-
 t/lei.t                       |  4 ++++
 5 files changed, 16 insertions(+), 11 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-12  8:42  5% [PATCH 0/3] test dependency fixes for minimal installs Eric Wong
2021-09-12  8:42  7% ` [PATCH 1/3] t/lei-*.t: guard setup_public_inboxes with test_lei Eric Wong

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).