You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by ph...@apache.org on 2009/04/18 11:40:01 UTC

svn commit: r766280 - in /perl/Apache-Test/tags/1_30: Changes lib/Apache/TestConfig.pm

Author: phred
Date: Sat Apr 18 09:40:00 2009
New Revision: 766280

URL: http://svn.apache.org/viewvc?rev=766280&view=rev
Log:
Resolve RT ticket 12911 where an infinite loops is created with no
httpd or apxs when run under a smoke test.  Thanks to Corion for the
spot.

Modified:
    perl/Apache-Test/tags/1_30/Changes
    perl/Apache-Test/tags/1_30/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/tags/1_30/Changes
URL: http://svn.apache.org/viewvc/perl/Apache-Test/tags/1_30/Changes?rev=766280&r1=766279&r2=766280&view=diff
==============================================================================
--- perl/Apache-Test/tags/1_30/Changes (original)
+++ perl/Apache-Test/tags/1_30/Changes Sat Apr 18 09:40:00 2009
@@ -8,6 +8,11 @@
 
 =item 1.31-dev
 
+Prevent infinite loop when no default apxs or httpd is present and repeated
+attempts to run the test suite under an automated harness (such as a cpan 
+smoke test).  Issue reported by CORION and ANDK, PR: 12911
+[Fred Moyer <fred@redhotpenguin.com]
+
 Use need_module('mod_cgi.c') and need_module('mod_cgid.c') in 
 t/next_available_port.t instead of need_cgi.  On case insensitive file
 systems such as OS X, need_cgi will fulfill the requirement with cgi.pm,

Modified: perl/Apache-Test/tags/1_30/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/tags/1_30/lib/Apache/TestConfig.pm?rev=766280&r1=766279&r2=766280&view=diff
==============================================================================
--- perl/Apache-Test/tags/1_30/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/tags/1_30/lib/Apache/TestConfig.pm Sat Apr 18 09:40:00 2009
@@ -2406,7 +2406,18 @@
         $prompt .= ":\n\n";
     }
 
+    my $i = 0;
     while (1) {
+
+        # prevent infinite loops in smoke tests, only give the user
+        # five chances to specify httpd or apxs before giving up
+        if ($i++ == 5) {
+
+            Apache::TestRun::skip_test_suite('y');
+            return;
+        }
+
+
         $ans = ExtUtils::MakeMaker::prompt($prompt, $default);
 
         # strip leading/closing spaces