summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-03-21 15:53:32 +0000
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-03-25 09:34:19 +0000
commit3e63457f336add47ed493b21a884e49d157f440c (patch)
tree825c5005496ea353401436778929776c75d2e00d
parent939e7f268559d7c80860c4e1a519e0c25d84f793 (diff)
downloadperl-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-xt/TEST1
-rw-r--r--t/harness3
-rw-r--r--t/run/runenv.t2
3 files changed, 6 insertions, 0 deletions
diff --git a/t/TEST b/t/TEST
index fc37118770..6d842d0859 100755
--- a/t/TEST
+++ b/t/TEST
@@ -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) {
diff --git a/t/harness b/t/harness
index b46582ddd9..e06c3f8009 100644
--- a/t/harness
+++ b/t/harness
@@ -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