On Thu, Jan 24, 2008 at 10:51:10PM -0500, David Golden wrote:
> Hello, everyone.
> 
> I've just added a new 'command_timeout' advanced config option to
> CPAN::Reporter.  This works like CPAN's 'inactivity_timeout' -- it
> kills anything run through CPAN::Reporter's record_command() function
> after that many seconds.  I see this as handy for any sort of
> unattended testing to prevent having a smoker hang up for hours
> because someone wrote a custom prompt or interactive test and didn't
> check for $ENV{AUTOMATED_TEST}, etc.

It was because of this stuff that I wrote POE::Component::CPAN::YACSmoke in
the end. Waking up of a morning to find that the smoker had been sat 
waiting on somebodies Makefile.PL for user input 

*sigh*

> However, I'd like to get some consensus on how interrupted commands
> should be graded.  I should be able to detect that the process died
> with an alarm signal, but frankly, I'd like a wider interpretation for
> any process that dies from a signal -- where $? & 127 is true.

The way PoCo-CPAN-YACSmoke handles idle timeouts is to simply kill off 
the whole current smoke process. And no report is therefore sent.

> Options:
> 
> (1) DISCARD -- just throw it away as junk
> 
> (2) UNKNOWN -- indicating that something weird/inconclusive happened
> 
> I think that (1) is safer -- where 'safe' means less noise about false
> positives -- but then what should we do in the case when someone
> intentionally hits CTRL-C because something has gotten hung up?  I.e.
> a live testers, not an automated tester.  Maybe that should trigger
> the opportunity for a valid report of some kind rather than just
> discarding the event entirely.  So I'm leaning slightly towards (2),
> which gives a tester an opportunity to choose to send a report or not.
>  And for any other signal death (not from the live tester) it says
> that something went wrong, but isn't as damning as a FAIL.
> 
> I suppose a third option is to do (1) if $ENV{AUTOMATED_TESTING} is
> set and (2) if it isn't.
> 
> What do people think?

It is a tough call. My gut feeling is towards (1), with the knee-jerk 
"If they can't be bothered to make their Makefile.PL handle automated
testing, I can't be bothered to send them a report" attitude.

As for hitting CTRL-C during testing modules interactively ( rather than 
smoking ), if I do this CPANPLUS will prompt me to edit the report and I
envdeavour to add some comment to report as to why I found it necessary to
do that.

My three pennies worth >:)

Cheers,

-- 
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http://www.gumbynet.org.uk
==========================

Attachment: pgpMfmrVgvamK.pgp
Description: PGP signature

Reply via email to