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 Tue, 16 Oct 2001 22:51:28 GMT
dougm       01/10/16 15:51:28

  Modified:    perl-framework/Apache-Test/lib/Apache TestRun.pm
                        TestServer.pm
  Log:
  only create t/.debugging note when using interactive debugger
  detect stale t/.debugging note (should never happen!)
  
  Revision  Changes    Path
  1.57      +8 -2      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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- TestRun.pm	2001/10/16 20:30:57	1.56
  +++ TestRun.pm	2001/10/16 22:51:27	1.57
  @@ -368,8 +368,14 @@
       #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'} = $opts->{'stop-httpd'} = 0;
  +        if ($server->ping) {
  +            warning "server is running under the debugger, defaulting to -run";
  +            $opts->{'start-httpd'} = $opts->{'stop-httpd'} = 0;
  +        }
  +        else {
  +            warning "removing stale debugger note: $file";
  +            unlink $file;
  +        }
       }
   
       if ($opts->{'start-httpd'}) {
  
  
  
  1.37      +11 -6     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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- TestServer.pm	2001/10/16 20:30:57	1.36
  +++ TestServer.pm	2001/10/16 22:51:27	1.37
  @@ -182,6 +182,7 @@
           $command = "gdb $httpd -command $file";
       }
   
  +    $self->note_debugging;
       debug  $command;
       system $command;
   
  @@ -193,6 +194,16 @@
       catfile $self->{config}->{vars}->{serverroot}, '.debugging';
   }
   
  +#make a note that the server is running under the debugger
  +#remove note when this process exits via END
  +
  +sub note_debugging {
  +    my $self = shift;
  +    my $file = $self->debugger_file;
  +    my $fh   = $self->{config}->genfile($file);
  +    eval qq(END { unlink "$file" });
  +}
  +
   sub start_debugger {
       my $self = shift;
       my $opts = shift;
  @@ -205,12 +216,6 @@
                 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