From 6c9c442fb6aa12fd871237bc2bb5aec56c5b3538 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 7 Apr 2024 10:52:38 +0000 Subject: t/lib.perl: fix Perl integration tests w/o installation 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); } -- cgit v1.2.3-24-ge0c7