diff options
author | Gabor Szabo <szabgab@gmail.com> | 2010-02-11 21:26:35 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-11 21:26:35 -0800 |
commit | dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9 (patch) | |
tree | 2d2da08f853fed3426f7ce7fecfd39e8597ffe2f /t | |
parent | Bug 545715: New Hook: bugmail_relationships (diff) | |
download | bugzilla-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar.gz bugzilla-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.tar.bz2 bugzilla-dc4e122eaf5710d1af8ddd48ef4cb747efaaa9a9.zip |
Bug 545762: Allow tests to pass when using the PERL5LIB environment variable.
r=mkanat, a=mkanat
Diffstat (limited to 't')
-rw-r--r-- | t/001compile.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/001compile.t b/t/001compile.t index 3e4273492..9e63da0b4 100644 --- a/t/001compile.t +++ b/t/001compile.t @@ -27,6 +27,7 @@ use strict; use 5.008001; use lib qw(. lib t); +use Config; use Support::Files; use Test::More tests => scalar(@Support::Files::testitems); @@ -59,8 +60,12 @@ sub compile_file { $T = "T"; } + my $libs = ''; + if ($ENV{PERL5LIB}) { + $libs = join " ", map { "-I$_" } split /$Config{path_sep}/, $ENV{PERL5LIB}; + } my $perl = qq{"$^X"}; - my $output = `$perl -wc$T $file 2>&1`; + my $output = `$perl $libs -wc$T $file 2>&1`; chomp($output); my $return_val = $?; $output =~ s/^\Q$file\E syntax OK$//ms; |