user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] tests: expand relative @INC paths
@ 2022-10-25 11:43 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2022-10-25 11:43 UTC (permalink / raw)
  To: meta

Since the lei-daemon may chdir around and lazy-loads package, we
must ensure @INC uses absolute paths so it can find stuff after

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
 lib/PublicInbox/ | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index abf4f364..e793a001 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -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));
 	@EXPORT = qw(tmpdir tcp_server tcp_connect require_git require_mods
 		run_script start_script key2sub xsys xsys_e xqx eml_load tick

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-25 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 11:43 [PATCH] tests: expand relative @INC paths Eric Wong

Code repositories for project(s) associated with this public inbox

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