diff options
author | David Mitchell <davem@iabyn.com> | 2017-04-07 08:46:13 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-04-07 09:00:34 +0100 |
commit | 19641fd71ab87a4234f86f69f958b61278dbdade (patch) | |
tree | c2fc291222861315f090d1b375616351c44820f8 /runtests.SH | |
parent | 4b05bc8ea5a106c203e7154f3cbae72e133c9c80 (diff) | |
download | perl-19641fd71ab87a4234f86f69f958b61278dbdade.tar.gz |
stop passing '.' in @INC to tests
Currently TestInit.pm adds '.' to @INC (except if running under taint).
Since *all* tests run from the perl core are invoked as
perl -MTestInit[=arg,arg,..] some/test.t
this means that all test scripts (including those under cpan/ etc) are
excuted with dot present, regardless of the settings of
$PERL_USE_UNSAFE_INC and -Ddefault_inc_excludes_dot.
This commit changes it so that:
1) TestInit.pm transparently passes though a trailing dot in @INC
if present (so it now honours $PERL_USE_UNSAFE_INC and
-Ddefault_inc_excludes_dot)
2) Adds a 'DOT' arg (e.g. -MTestInit=DOT) which unconditionally adds '.';
3) Updates t/TEST so that it (and t/harness which requires t/TEST)
have a whitelist of cpan/ modules which need '.'; test scripts for these
are invoked with -MTestInit=DOT.
4) Removes the $PERL_USE_UNSAFE_INC unsetting in t/TEST and t/harness;
now that environmant variable is passed unchanged to all perl processes
involved in running the test suite.
As of this commit, lots of tests will fail on a dotless perl build; the
next few commits will fix up any tests scripts and non cpan/ distributions
which relied on dot being present.
Diffstat (limited to 'runtests.SH')
0 files changed, 0 insertions, 0 deletions