dagolden / ToolSet

(Perl) Load your commonly-used modules in a single import
http://search.cpan.org/dist/ToolSet
4 stars 2 forks source link

perl-5.26.0-readiness: tests fail with PERL_USE_UNSAFE_INC=0 #5

Closed jkeenan closed 7 years ago

jkeenan commented 7 years ago
[ToolSet] 1129 $ echo $PERL_USE_UNSAFE_INC
0
[ToolSet] 1130 $ ~/testing/blead/bin/prove -I~/testing/blead/lib -l t/*.t
t/01-api.t .......... ok   
t/02-strictures.t ... ok   
t/03-warnings.t ..... ok   
t/04-export.t ....... ok     
t/05-self-export.t .. ok   
t/06-feature.t ...... ok   
t/07-pragmas.t ...... 1/5 
#   Failed test 'no error in eval'
#   at t/07-pragmas.t line 16.
#          got: 'Can't locate t/ToolSet/Pragmas.pm in @INC (you may need to install the t::ToolSet::Pragmas module) (@INC contains: t/lib /home/jkeenan/gitwork/zzzothers/ToolSet/lib /home/jkeenan/gitwork/zzzothers/ToolSet/~/testing/blead/lib /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 6) line 1.
# BEGIN failed--compilation aborted at (eval 6) line 1.
# '
#     expected: ''

#   Failed test 'bogus pragma set'
#   at t/07-pragmas.t line 17.

#   Failed test 'no error in eval'
#   at t/07-pragmas.t line 22.
#          got: 'Can't locate t/ToolSet/Pragmas.pm in @INC (you may need to install the t::ToolSet::Pragmas module) (@INC contains: t/lib /home/jkeenan/gitwork/zzzothers/ToolSet/lib /home/jkeenan/gitwork/zzzothers/ToolSet/~/testing/blead/lib /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 8) line 1.
# BEGIN failed--compilation aborted at (eval 8) line 1.
# '
#     expected: ''

#   Failed test 'use_pragma + no_pragma'
#   at t/07-pragmas.t line 26.
#                   'Can't locate t/Sample/NoStrictRefs.pm in @INC (you may need to install the t::Sample::NoStrictRefs module) (@INC contains: t/lib /home/jkeenan/gitwork/zzzothers/ToolSet/lib /home/jkeenan/gitwork/zzzothers/ToolSet/~/testing/blead/lib /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 10) line 1.
# BEGIN failed--compilation aborted at (eval 10) line 1.
# '
#     doesn't match '(?^:Global symbol "\$pi" requires explicit package name)'
# Looks like you failed 4 tests of 5.
t/07-pragmas.t ...... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/5 subtests 
t/50-SWC.t .......... ok   

Test Summary Report
-------------------
t/07-pragmas.t    (Wstat: 1024 Tests: 5 Failed: 4)
  Failed tests:  1-3, 5
  Non-zero exit status: 4
Files=8, Tests=42,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.28 cusr  0.01 csys =  0.32 CPU)
Result: FAIL

Will try to submit pull request.

Thank you very much. Jim Keenan

jkeenan commented 7 years ago

I'm not sure how to fix this. I would have expected this patch to enable all tests to PASS under PERL_USE-UNSAFE_INC=0.

diff --git a/t/07-pragmas.t b/t/07-pragmas.t
index f7595e9..8acf9ae 100644
--- a/t/07-pragmas.t
+++ b/t/07-pragmas.t
@@ -1,5 +1,5 @@
 use strict;
-use lib 't/lib';
+use lib ( "./t/lib", "./t" );
 use Test::More;

 if ( $] >= 5.009 ) {

However, I still got this:

[ToolSet] 1152 $ ~/testing/blead/bin/perl -I~/testing/blead/lib Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for ToolSet
Writing MYMETA.yml and MYMETA.json
[ToolSet] 1153 $ make
Skip blib/lib/ToolSet/SWC.pm (unchanged)
Skip blib/lib/ToolSet.pm (unchanged)
[ToolSet] 1154 $ make test
PERL_DL_NONLAZY=1 "/home/jkeenan/testing/blead/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-api.t .......... ok   
t/02-strictures.t ... ok   
t/03-warnings.t ..... ok   
t/04-export.t ....... ok     
t/05-self-export.t .. ok   
t/06-feature.t ...... ok   
t/07-pragmas.t ...... 1/5 
#   Failed test 'no error in eval'
#   at t/07-pragmas.t line 16.
#          got: 'Can't locate t/ToolSet/Pragmas.pm in @INC (you may need to install the t::ToolSet::Pragmas module) (@INC contains: ./t/lib ./t /home/jkeenan/gitwork/zzzothers/ToolSet/blib/lib /home/jkeenan/gitwork/zzzothers/ToolSet/blib/arch /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 6) line 1.
# BEGIN failed--compilation aborted at (eval 6) line 1.
# '
#     expected: ''

#   Failed test 'bogus pragma set'
#   at t/07-pragmas.t line 17.

#   Failed test 'no error in eval'
#   at t/07-pragmas.t line 22.
#          got: 'Can't locate t/ToolSet/Pragmas.pm in @INC (you may need to install the t::ToolSet::Pragmas module) (@INC contains: ./t/lib ./t /home/jkeenan/gitwork/zzzothers/ToolSet/blib/lib /home/jkeenan/gitwork/zzzothers/ToolSet/blib/arch /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 8) line 1.
# BEGIN failed--compilation aborted at (eval 8) line 1.
# '
#     expected: ''

#   Failed test 'use_pragma + no_pragma'
#   at t/07-pragmas.t line 26.
#                   'Can't locate t/Sample/NoStrictRefs.pm in @INC (you may need to install the t::Sample::NoStrictRefs module) (@INC contains: ./t/lib ./t /home/jkeenan/gitwork/zzzothers/ToolSet/blib/lib /home/jkeenan/gitwork/zzzothers/ToolSet/blib/arch /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/site_perl/5.26.0 /home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux /home/jkeenan/testing/blead/lib/perl5/5.26.0) at (eval 10) line 1.
# BEGIN failed--compilation aborted at (eval 10) line 1.
# '
#     doesn't match '(?^:Global symbol "\$pi" requires explicit package name)'
# Looks like you failed 4 tests of 5.
t/07-pragmas.t ...... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/5 subtests 
t/50-SWC.t .......... ok   

Test Summary Report
-------------------
t/07-pragmas.t    (Wstat: 1024 Tests: 5 Failed: 4)
  Failed tests:  1-3, 5
  Non-zero exit status: 4
Files=8, Tests=42,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.26 cusr  0.02 csys =  0.31 CPU)
Result: FAIL
Failed 1/8 test programs. 4/42 subtests failed.
Makefile:864: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255