unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] t/lib.perl: fix Perl integration tests w/o installation
@ 2024-04-07 10:52 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-04-07 10:52 UTC (permalink / raw)
  To: unicorn-public

We can't rely on `ruby -I $PATH' args being passed to
subprocesses, so rely on the RUBYLIB environment instead.
---
 t/lib.perl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/lib.perl b/t/lib.perl
index b20a2c6..8c842b1 100644
--- a/t/lib.perl
+++ b/t/lib.perl
@@ -240,7 +240,9 @@ sub unicorn {
 	state $eng = $ENV{TEST_RUBY_ENGINE} // `$ruby -e 'print RUBY_ENGINE'`;
 	state $ext = File::Spec->rel2abs("test/$eng-$ver/ext/unicorn_http");
 	state $exe = File::Spec->rel2abs("test/$eng-$ver/bin/unicorn");
-	my $pid = spawn(\%env, $ruby, '-I', $lib, '-I', $ext, $exe, @args);
+	state $rl = $ENV{RUBYLIB} ? "$lib:$ext:$ENV{RUBYLIB}" : "$lib:$ext";
+	$env{RUBYLIB} = $rl;
+	my $pid = spawn(\%env, $ruby, $exe, @args);
 	UnicornTest::AutoReap->new($pid);
 }
 

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

only message in thread, other threads:[~2024-04-07 10:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-07 10:52 [PATCH] t/lib.perl: fix Perl integration tests w/o installation Eric Wong

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

	https://yhbt.net/unicorn.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).