* [PATCH 1/3] t/nntpd: fix lsof check w/ TEST_RUN_MODE=0
2020-04-21 3:22 6% [PATCH 0/3] t/nntpd: small fixes and cleanups Eric Wong
@ 2020-04-21 3:22 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-21 3:22 UTC (permalink / raw)
To: meta
The `xqx' sub requires an absolute path for optional
commands.
Fixes: 6e07def560b211d9 ("testcommon: spawn-aware system() and qx[] workalikes")
---
t/nntpd.t | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/nntpd.t b/t/nntpd.t
index 66aa48f1..b2ef575d 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -4,6 +4,7 @@ use strict;
use warnings;
use Test::More;
use PublicInbox::TestCommon;
+use PublicInbox::Spawn qw(which);
require_mods(qw(DBD::SQLite));
require PublicInbox::SearchIdx;
require PublicInbox::Msgmap;
@@ -304,8 +305,9 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//2)) {
skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
}
+ my $lsof = which('lsof') or skip 'lsof missing', 1;
my $rdr = { 2 => \(my $null) };
- my @of = xqx(['lsof', '-p', $td->{pid}], undef, $rdr);
+ my @of = xqx([$lsof, '-p', $td->{pid}], undef, $rdr);
skip('lsof broken', 1) if (!scalar(@of) || $?);
my @xap = grep m!Search/Xapian!, @of;
is_deeply(\@xap, [], 'Xapian not loaded in nntpd');
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] t/nntpd: small fixes and cleanups
@ 2020-04-21 3:22 6% Eric Wong
2020-04-21 3:22 7% ` [PATCH 1/3] t/nntpd: fix lsof check w/ TEST_RUN_MODE=0 Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-21 3:22 UTC (permalink / raw)
To: meta
Eric Wong (3):
t/nntpd: fix lsof check w/ TEST_RUN_MODE=0
t/nntpd: reduce dependencies on internal API
t/nntpd: die if we can't open stderr output
t/nntpd.t | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-21 3:22 6% [PATCH 0/3] t/nntpd: small fixes and cleanups Eric Wong
2020-04-21 3:22 7% ` [PATCH 1/3] t/nntpd: fix lsof check w/ TEST_RUN_MODE=0 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).