Skip Menu |

This queue is for tickets about the Pod-Usage CPAN distribution.

Maintainer(s)' notes

Please use Github for all future tickets, patches and pull requests: https://github.com/Dual-Life/Pod-Usage

Thanks to Nicolas R (ATOOMIC) for setting up everything there!

Report information
The Basics
Id: 102101
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Pod-Usage

People
Owner: Marek.Rouchal [...] gmx.net
Requestors: BINGOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.65
Fixed in: 1.66



Subject: New tests fail when in core
The two new tests fail when integrated into core: [canker:(blead)]$ ./perl harness -v ../cpan/Pod-Usage/t/pod/headwithmarkup.t ../cpan/Pod-Usage/t/pod/headwithmarkup.t .. 1..1 Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod-Usage/../../../../.. BEGIN failed--compilation aborted. # Failed test at t/pod/headwithmarkup.t line 10. # got: '' # expected: 'backup pkg please dest: Para for backup.' not ok 1 # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- ../cpan/Pod-Usage/t/pod/headwithmarkup.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.08 cusr 0.02 csys = 0.11 CPU) Result: FAIL [canker:(blead)]$ ./perl harness -v ../cpan/Pod-Usage/t/pod/selectheaders.t ../cpan/Pod-Usage/t/pod/selectheaders.t .. 1..2 Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod-Usage/../../../../.. BEGIN failed--compilation aborted. # Failed test 'selection of Foo section' # at t/pod/selectheaders.t line 9. # got: '' # expected: 'Foo: This is foo' not ok 1 - selection of Foo section Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod-Usage/../../../../.. BEGIN failed--compilation aborted. # Failed test 'selection of Bar section' # at t/pod/selectheaders.t line 14. # got: '' # expected: 'Bar: This is bar.' not ok 2 - selection of Bar section # Looks like you failed 2 tests of 2. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests Test Summary Report ------------------- ../cpan/Pod-Usage/t/pod/selectheaders.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Files=1, Tests=2, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.12 cusr 0.02 csys = 0.15 CPU) Result: FAIL blib doesn't exist when building in core as modules are copied to lib/ in root of the perl source tree instead.
Can you tell me: - what is the cwd? - when the test is running, where would it find Pod/Usage.pm? - where would it find any core modules, like Test/More.pm? - how can I detect, whether this is running in core? Any ENV var set? Thanks, Marek Am Fr 13. Feb 2015, 05:12:47, BINGOS schrieb: Show quoted text
> The two new tests fail when integrated into core: > > [canker:(blead)]$ ./perl harness -v ../cpan/Pod- > Usage/t/pod/headwithmarkup.t > ../cpan/Pod-Usage/t/pod/headwithmarkup.t .. > 1..1 > Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod- > Usage/../../../../.. > BEGIN failed--compilation aborted. > > # Failed test at t/pod/headwithmarkup.t line 10. > # got: '' > # expected: 'backup pkg please dest: Para for backup.' > not ok 1 > # Looks like you failed 1 test of 1. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests > > Test Summary Report > ------------------- > ../cpan/Pod-Usage/t/pod/headwithmarkup.t (Wstat: 256 Tests: 1 Failed: > 1) > Failed test: 1 > Non-zero exit status: 1 > Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.08 cusr > 0.02 csys = 0.11 CPU) > Result: FAIL > [canker:(blead)]$ ./perl harness -v ../cpan/Pod- > Usage/t/pod/selectheaders.t > ../cpan/Pod-Usage/t/pod/selectheaders.t .. > 1..2 > Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod- > Usage/../../../../.. > BEGIN failed--compilation aborted. > > # Failed test 'selection of Foo section' > # at t/pod/selectheaders.t line 9. > # got: '' > # expected: 'Foo: This is foo' > not ok 1 - selection of Foo section > Cannot find blib even in /usr/home/bingos/repos/perl.git/cpan/Pod- > Usage/../../../../.. > BEGIN failed--compilation aborted. > > # Failed test 'selection of Bar section' > # at t/pod/selectheaders.t line 14. > # got: '' > # expected: 'Bar: This is bar.' > not ok 2 - selection of Bar section > # Looks like you failed 2 tests of 2. > Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/2 subtests > > Test Summary Report > ------------------- > ../cpan/Pod-Usage/t/pod/selectheaders.t (Wstat: 512 Tests: 2 Failed: > 2) > Failed tests: 1-2 > Non-zero exit status: 2 > Files=1, Tests=2, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.12 cusr > 0.02 csys = 0.15 CPU) > Result: FAIL > > blib doesn't exist when building in core as modules are copied to lib/ > in root of the > perl source tree instead.
On Sun Feb 15 11:52:41 2015, MAREKR wrote: Show quoted text
> Can you tell me: > - what is the cwd? > - when the test is running, where would it find Pod/Usage.pm? > - where would it find any core modules, like Test/More.pm? > - how can I detect, whether this is running in core? Any ENV var set? >
- The cwd is cpan/Pod-Usage - It'll find Pod/Usage.pm in the lib/ directory which relative to the cwd is ../../lib - Other core modules are in the same location - PERL_CORE environment variable is set when building and testing under core. I've attached a patch file which I have tested in core that resolves the issue.
Subject: pod-usage.diff
diff --git a/cpan/Pod-Usage/t/pod/headwithmarkup.t b/cpan/Pod-Usage/t/pod/headwithmarkup.t index 6e3d8eb..6b33032 100644 --- a/cpan/Pod-Usage/t/pod/headwithmarkup.t +++ b/cpan/Pod-Usage/t/pod/headwithmarkup.t @@ -1,9 +1,12 @@ use Test::More tests => 1; +my $blib = '-Mlib'; +$blib = '-I../../lib' if $ENV{PERL_CORE}; + my $pl = $0; $pl =~ s{t$}{pl}; -my $out = `$^X -Mblib $pl`; +my $out = `$^X $blib $pl`; $out =~ s{\s+}{ }gs; $out =~ s{^\s+|\s+$}{}gs; # we want to make sure that the marked-up text is not lost diff --git a/cpan/Pod-Usage/t/pod/selectheaders.t b/cpan/Pod-Usage/t/pod/selectheaders.t index 8e47984..0c87bbb 100644 --- a/cpan/Pod-Usage/t/pod/selectheaders.t +++ b/cpan/Pod-Usage/t/pod/selectheaders.t @@ -1,14 +1,17 @@ use Test::More tests => 2; +my $blib = '-Mblib'; +$blib = '-I../../lib' if $ENV{PERL_CORE}; + my $pl = $0; $pl =~ s{t$}{pl}; -my $out = `$^X -Mblib $pl Foo`; +my $out = `$^X $blib $pl Foo`; $out =~ s{\s+}{ }gs; $out =~ s{^\s+|\s+$}{}gs; is($out, 'Foo: This is foo', 'selection of Foo section'); -$out = `$^X -Mblib $pl Bar`; +$out = `$^X $blib $pl Bar`; $out =~ s{\s+}{ }gs; $out =~ s{^\s+|\s+$}{}gs; is($out, 'Bar: This is bar.', 'selection of Bar section');
Thanks a lot for the patch! Applied (slightly modified) in Pod-Usage-1.66