From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] tests: expand relative @INC paths
Date: Tue, 25 Oct 2022 11:43:18 +0000 [thread overview]
Message-ID: <20221025114318.1895892-1-e@80x24.org> (raw)
Since the lei-daemon may chdir around and lazy-loads package, we
must ensure @INC uses absolute paths so it can find stuff after
(f)chdir.
I noticed this in running `perl -I lib -w t/lei-q-kw.t'
instead of my usual `prove -bvw t/lei-q-kw.t' to save some
cycles.
---
lib/PublicInbox/TestCommon.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index abf4f364..e793a001 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -14,6 +14,9 @@ our @EXPORT;
my $lei_loud = $ENV{TEST_LEI_ERR_LOUD};
my $tail_cmd = $ENV{TAIL};
our ($lei_opt, $lei_out, $lei_err, $lei_cwdfh);
+
+$_ = File::Spec->rel2abs($_) for (grep(!m!^/!, @INC));
+
BEGIN {
@EXPORT = qw(tmpdir tcp_server tcp_connect require_git require_mods
run_script start_script key2sub xsys xsys_e xqx eml_load tick
reply other threads:[~2022-10-25 11:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221025114318.1895892-1-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).