Philippe M. Chiasson wrote:
Max Maischein via RT wrote:

This message about Apache-Test was sent to you by [EMAIL PROTECTED] <[EMAIL PROTECTED]> via rt.cpan.org

Full context and any attached attachments can be found at:
<URL: https://rt.cpan.org/Ticket/Display.html?id=8418 >

Hello,

the Apache::Test Makefile.PL enters an infinite loop when it is running without a connected terminal and can't find the path to httpd. This is very bad for CPAN testers who maybe don't have a httpd binary somewhere to be found, and where the testing runs unattended. Please use the prompt() function in ExtUtils::MakeMaker and don't enter a loop if the default is accepted, or detect that Makefile.PL is run in unattended mode and don't enter the loop at all.

for the future, this belongs to the httpd-test list, not here :)

We are already using ExtUtils::MakeMaker::prompt(), but the problem is that we don't quite
handle non-console TTYs proprely and do indeed loop infinitely. Easy to reproduce on a
system without httpd/apxs


Following patch fixes the problem for me.

-t STDOUT should work just as well, no need for \*. we already use that in TestTrace.pm.


+        if ((lc($ans) eq 'skip' || !-t \*STDIN) && !$optional) {
             Apache::TestRun::skip_test_suite();
             next; # in case they change their mind

         my $ans = ExtUtils::MakeMaker::prompt($prompt, $default);
-        return if lc($ans) =~ /no/;
+        return if lc($ans) =~ /no/ && -t \*STDIN;
     }

but why entering these functions at all, in the !-t mode? makes the logic complicated.


--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to