From: Vincent Pit Date: Tue, 12 Jul 2016 14:47:06 +0000 (-0300) Subject: Work around test failures on darwin X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=9d12e1a9b21a372b49301b11df9b0720ba484ef4;p=perl%2Fmodules%2FVPIT-TestHelpers.git Work around test failures on darwin Starting with OS X 10.11, DYLD_LIBRARY_PATH is no longer propagated. --- diff --git a/t/30-run_perl.t b/t/30-run_perl.t index 2238fb7..bfc7bbb 100644 --- a/t/30-run_perl.t +++ b/t/30-run_perl.t @@ -25,7 +25,9 @@ my %expected_vars = ( 'darwin' => [ ], 'linux' => [ ], ); -push @$_, $ld_path for values %expected_vars; +unless ($^O eq 'darwin') { + push @$_, $ld_path for values %expected_vars; +} my @all_vars = do { my %uniq; @@ -38,16 +40,18 @@ my @ignored_vars = qw< VERSIONER_PERL_VERSION __CF_USER_TEXT_ENCODING >; +push @ignored_vars, $ld_path if $^O eq 'darwin'; for my $os (qw) { 1 while unlink $filename; - local $^O = $os; local %ENV; - @ENV{@all_vars} = @all_vars; - run_perl $code; + { + local $^O = $os; + run_perl $code; + } my %subprocess_env;