[SAPER - Sun Jan 16 16:19:09 2005]:
Show quoted text> The FAIL reports sent by CPANPLUS 0.051 don't include the output of
> "make test" or "Build test", whereas CPANPLUS 0.050_xx did. While
> not being severe, this may be annoying to an author who receive
> such reports because they he then don't have the opportunity to
> immediatly know (for example) wihch test failed.
>
> For reference, here[1] is a FAIL report sent by CPANPLUS 0.050_xx and
> here[2] is one sent by CPANPLUS 0.051.
>
> [1]
http://www.nntp.perl.org/group/perl.cpan.testers/175706
> [2]
http://www.nntp.perl.org/group/perl.cpan.testers/178985
Actually, this is not a difference between 0.050_04 and 0.051, but between using Module::
Build and using ExtUtils::MakeMaker;
EU::MM's make test is run by shelling out and capturing the output, but M::B's build test is
run by calling it's API. The build test call will die on test failure, but $@ only contains the
summary line, rather than the entire output.
This could be fixed in either T::H or in M::B, but M::B seems the logical choice in this case.
Attached is a patch for M::B 0.2607 which will change this test report:
http://www.nntp.perl.org/group/perl.cpan.testers/178257
into this test report:
http://www.nntp.perl.org/group/perl.cpan.testers/179030
Moving this ticket over to the M::B queue, so they may address the issue
==== //depot/cpanplus/devel/lib/CPANPLUS/inc/installers/Module/Build/Base.pm#3 - /Users/kane/sources/p4/cpanplus/devel/lib/CPANPLUS/inc/installers/Module/Build/Base.pm ====
1349c1349,1369
< Test::Harness::runtests(@$tests);
---
>
> # Test::Harness prints all it's diagnostics to STDOUT, then dies
> # with a summary of the failure. In order to facilitate test reporting
> # and better diagnostics, we'd like to capture the T::H output and add
> # it to our die() message.
> use IO::String;
> local *STDOUT;
> tie *STDOUT, 'IO::String';
>
> eval { Test::Harness::runtests(@$tests) };
>
> seek( STDOUT, 0, 0 );
> my $msg .= join "", <STDOUT>;
>
> # T::H would have done this already, but we caught it's output
> print $msg;
>
> # now die with the full output, plus the error message, if there
> # was an error
> die $msg . $/ . $@ if $@;
>