diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-03-21 15:53:32 +0000 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-03-25 09:34:19 +0000 |
commit | 3e63457f336add47ed493b21a884e49d157f440c (patch) | |
tree | 825c5005496ea353401436778929776c75d2e00d | |
parent | 939e7f268559d7c80860c4e1a519e0c25d84f793 (diff) | |
download | perl-3e63457f336add47ed493b21a884e49d157f440c.tar.gz |
Delete PERL_USE_UNSAFE_INC from test environment
It intereferes with tests of @INC contents, and all core tests must work
without it.
-rwxr-xr-x | t/TEST | 1 | ||||
-rw-r--r-- | t/harness | 3 | ||||
-rw-r--r-- | t/run/runenv.t | 2 |
3 files changed, 6 insertions, 0 deletions
@@ -82,6 +82,7 @@ my %temp_no_core = my @bad_env_vars = qw( PERL5LIB PERLLIB PERL5OPT PERL_YAML_BACKEND PERL_JSON_BACKEND + PERL_USE_UNSAFE_INC ); for my $envname (@bad_env_vars) { @@ -34,6 +34,9 @@ if ($ARGV[0] && $ARGV[0] eq '-torture') { # which live dual lives on CPAN. $ENV{PERL_CORE} = 1; +# All our tests should work without . in @INC +delete $ENV{PERL_USE_UNSAFE_INC}; + my (@tests, $re); # [.VMS]TEST.COM calls harness with empty arguments, so clean-up @ARGV diff --git a/t/run/runenv.t b/t/run/runenv.t index fe0d9cd1b6..1b317ce5af 100644 --- a/t/run/runenv.t +++ b/t/run/runenv.t @@ -22,6 +22,7 @@ my $FAILURE_CODE = 119; delete $ENV{PERLLIB}; delete $ENV{PERL5LIB}; delete $ENV{PERL5OPT}; +delete $ENV{PERL_USE_UNSAFE_INC}; # Run perl with specified environment and arguments, return (STDOUT, STDERR) @@ -33,6 +34,7 @@ sub runperl_and_capture { delete $ENV{PERLLIB}; delete $ENV{PERL5LIB}; delete $ENV{PERL5OPT}; + delete $ENV{PERL_USE_UNSAFE_INC}; my $pid = fork; return (0, "Couldn't fork: $!") unless defined $pid; # failure if ($pid) { # parent |