Skip Menu |

This queue is for tickets about the CGI-AIS-Session CPAN distribution.

Report information
The Basics
Id: 28110
Status: open
Priority: 0/
Queue: CGI-AIS-Session

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.02
Fixed in: (no value)



Subject: test.pl
Can you convert tests to Test::Simple/Test::More? test.pl tests are not reported properly by CPANPLUS. -- Alexandr Ciornii, http://chorny.net
Subject: Re: [rt.cpan.org #28110] test.pl
Date: Mon, 16 Jul 2007 15:48:54 -0500
To: bug-CGI-AIS-Session [...] rt.cpan.org
From: "David Nicol" <davidnicol [...] gmail.com>
On 7/11/07, Alexandr Ciornii via RT <bug-CGI-AIS-Session@rt.cpan.org> wrote: Show quoted text
> > Can you convert tests to Test::Simple/Test::More? test.pl tests are > not reported properly by CPANPLUS.
By the principle of minimization of total maintenance effort, that is a bug in CPANPLUS.
On Jul 16 16:49:10 2007, davidnicol@gmail.com wrote: Show quoted text
> On 7/11/07, Alexandr Ciornii via RT <bug-CGI-AIS-Session@rt.cpan.org>
wrote: Show quoted text
> > > > Can you convert tests to Test::Simple/Test::More? test.pl tests are > > not reported properly by CPANPLUS.
> > By the principle of minimization of total maintenance effort, that > is a bug in CPANPLUS.
Then you should modify test to return correct exit status: END {print "not ok 1\n" unless $loaded; exit(1) unless $loaded;} -- Alexandr Ciornii, http://chorny.net
On Sun Oct 07 15:24:44 2007, CHORNY wrote: Show quoted text
> On Jul 16 16:49:10 2007, davidnicol@gmail.com wrote:
> > On 7/11/07, Alexandr Ciornii via RT <bug-CGI-AIS-Session@rt.cpan.org>
> wrote:
> > > > > > Can you convert tests to Test::Simple/Test::More? test.pl tests are > > > not reported properly by CPANPLUS.
> > > > By the principle of minimization of total maintenance effort, that > > is a bug in CPANPLUS.
> > Then you should modify test to return correct exit status: > > END {print "not ok 1\n" unless $loaded; exit(1) unless $loaded;}
CPANPLUS only looks at the exit status of 'make test'. Oddly enough, if it's a Test::More based test.pl, the exit status is set in 'make test' after failure. If it's Test.pm based, it is not. The easy fix is equally odd: Test.pm based tests that live in the t/some_test.t framework (ie, all tests under t/) DO get picked up by test::harness correctly, and set the exit status for make test. So, to get around this specific issue, you can do: mv test.pl t/test.t and everything should work as expect. Arguably, this could be construed as an issue with Test::Harness, it may also be for Historical Reasons =/
Subject: Re: [rt.cpan.org #28110] test.pl
Date: Thu, 30 Apr 2009 10:13:05 -0500
To: bug-CGI-AIS-Session [...] rt.cpan.org
From: David Nicol <davidnicol [...] gmail.com>
On Thu, Apr 30, 2009 at 3:08 AM, Jos Boumans via RT < bug-CGI-AIS-Session@rt.cpan.org> wrote: Show quoted text
> Queue: CGI-AIS-Session > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=28110 > > > CPANPLUS only looks at the exit status of 'make test'. Oddly enough, if > it's a Test::More based test.pl, the exit status is set in 'make test' > after failure. If it's Test.pm based, it is not. > > The easy fix is equally odd: Test.pm based tests that live in the > t/some_test.t framework (ie, all tests under t/) DO get picked up by > test::harness correctly, and set the exit status for make test. > > So, to get around this specific issue, you can do: > > mv test.pl t/test.t > > and everything should work as expect.
but slipping an C< END { $tests_failed and exit(1) } > into Test.pm means the test.pl dies, causing make to die, causing CPANPLUSPLUS to DTRT (no?)
http://cpansearch.perl.org/src/DAVIDNICO/CGI-AIS-Session-0.02/test.pl isn't based on Test.pm and it doesn't really test anything. When I get around to reengineering CGI-AIS-Session, I'll make a proper test, okay?