httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq Makefile.PL
Date Tue, 26 Nov 2002 18:49:00 GMT
joes        2002/11/26 10:49:00

  Modified:    .        Makefile.PL
  Log:
  Add 60s timeout for Apache::test setup phase of C<% perl Makefile.PL>.
  
  Revision  Changes    Path
  1.14      +17 -7     httpd-apreq/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Makefile.PL	24 Nov 2002 15:14:45 -0000	1.13
  +++ Makefile.PL	26 Nov 2002 18:49:00 -0000	1.14
  @@ -2,10 +2,19 @@
   use strict;
   use 5.005;
   
  -use Apache::test;
  -my %params = Apache::test->get_test_params();
  -Apache::test->write_httpd_conf(%params, include => join '', <DATA>);
  -*MY::test = sub {Apache::test->MM_test(%params)};
  +
  +eval {
  +    require Apache::test;
  +    local $SIG{ALRM} = sub { die "alarm\n" };
  +    alarm 60;
  +    my %params = Apache::test->get_test_params();
  +    alarm 0;
  +
  +    Apache::test->write_httpd_conf(%params, include => join '', <DATA>);
  +    *MY::test = sub {Apache::test->MM_test(%params)};
  +};
  +
  +print "\n[timeout] skipping test setup...\n" if $@ eq "alarm\n";
   # prerequisites
   my %require = (
       "Apache::test" => "", # any version will do
  @@ -40,11 +49,12 @@
     $ENV{AP_LIB} = $Apache::MyConfig::Setup{APACHE_LIB};
     $ENV{MP_LIB} = $Apache::MyConfig::Setup{MODPERL_LIB};
     unless (-f "$ENV{MP_LIB}/mod_perl.so") {
  -    die "Cannot find mod_perl.so in $ENV{MP_LIB}. Please build mod_perl first";
  +    die "Cannot find mod_perl.so in $ENV{MP_LIB}. " .
  +        "Please build mod_perl first";
     }
     unless (-f "$ENV{AP_LIB}/ApacheCore.lib") {
  -    die "Cannot find ApacheCore.lib in $ENV{AP_LIB}. Please build apache first
  -    .";
  +    die "Cannot find ApacheCore.lib in $ENV{AP_LIB}. " .
  +        "Please build apache first.";
     }
   }
   
  
  
  

Mime
View raw message