httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm TestServer.pm
Date Fri, 12 Oct 2001 19:10:31 GMT
dougm       01/10/12 12:10:31

  Modified:    perl-framework/Apache-Test/lib/Apache TestRun.pm
                        TestServer.pm
  Log:
  if t/TEST -d is running make sure we don't try to stop/start the server
  when running tests
  
  Revision  Changes    Path
  1.54      +14 -4     httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- TestRun.pm	2001/10/07 05:03:33	1.53
  +++ TestRun.pm	2001/10/12 19:10:31	1.54
  @@ -362,11 +362,21 @@
           exit 1;
       }
   
  -    if ($self->{opts}->{'start-httpd'}) {
  -        exit 1 unless $self->{server}->start;
  +    my $opts = $self->{opts};
  +    my $server = $self->{server};
  +
  +    #if t/TEST -d is running make sure we don't try to stop/start the server
  +    my $file = $server->debugger_file;
  +    if (-e $file and $opts->{'start-httpd'}) {
  +        warning "server is running under the debugger, defaulting to -run";
  +        $opts->{'start-httpd'} = 0;
       }
  -    elsif ($self->{opts}->{'run-tests'}) {
  -        if (!$self->{server}->ping) {
  +
  +    if ($opts->{'start-httpd'}) {
  +        exit 1 unless $server->start;
  +    }
  +    elsif ($opts->{'run-tests'}) {
  +        if (!$server->ping) {
               error "server is not ready yet, try again.";
               exit;
           }
  
  
  
  1.33      +11 -0     httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm
  
  Index: TestServer.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TestServer.pm	2001/09/19 11:12:06	1.32
  +++ TestServer.pm	2001/10/12 19:10:31	1.33
  @@ -188,6 +188,11 @@
       unlink $file;
   }
   
  +sub debugger_file {
  +    my $self = shift;
  +    catfile $self->{config}->{vars}->{serverroot}, '.debugging';
  +}
  +
   sub start_debugger {
       my $self = shift;
       my $opts = shift;
  @@ -200,6 +205,12 @@
                 join ", ", sort keys %debuggers;
           die("\n");
       }
  +
  +    #make a note that the server is running under the debugger
  +    #remove note when this process exits via END
  +    my $file = $self->debugger_file;
  +    my $fh   = $self->{config}->genfile($file);
  +    eval qq(END { unlink "$file" });
   
       my $method = "start_" . $debuggers{ $opts->{debugger} };
       $self->$method($opts);
  
  
  

Mime
View raw message