httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm
Date Mon, 09 Aug 2004 20:50:14 GMT
stas        2004/08/09 13:50:14

  Modified:    perl-framework/Apache-Test/lib/Apache TestRun.pm
  Log:
  split exit_opts into those that need to know about httpd and those that
  don't. run those at the appropriate timing. so now -debug and -ping should
  work again
  
  Revision  Changes    Path
  1.178     +9 -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.177
  retrieving revision 1.178
  diff -u -u -r1.177 -r1.178
  --- TestRun.pm	9 Aug 2004 06:19:15 -0000	1.177
  +++ TestRun.pm	9 Aug 2004 20:50:14 -0000	1.178
  @@ -56,10 +56,12 @@
   my @num_opts     = qw(times);
   my @list_opts    = qw(preamble postamble breakpoint);
   my @hash_opts    = qw(header);
  -my @help_opts    = qw(clean help ping);
  -my @exit_opts    = (@help_opts, @debug_opts);
  +my @help_opts    = qw(clean help);
   my @request_opts = qw(get post head);
   
  +my @exit_opts_no_need_httpd = (@help_opts);
  +my @exit_opts_need_httpd    = (@debug_opts, qw(ping));
  +
   my %usage = (
      'start-httpd'     => 'start the test server',
      'run-tests'       => 'run the tests',
  @@ -508,8 +510,9 @@
   
   sub try_exit_opts {
       my $self = shift;
  +    my @opts = @_;
   
  -    for (@exit_opts) {
  +    for (@opts) {
           next unless exists $self->{opts}->{$_};
           my $method = "opt_$_";
           my $rc = $self->$method();
  @@ -693,10 +696,12 @@
       local($SIG{__DIE__}, $SIG{INT});
       $self->install_sighandlers;
   
  -    $self->try_exit_opts;
  +    $self->try_exit_opts(@exit_opts_no_need_httpd);
   
       # httpd is found here (unless it was already configured before)
       $self->{test_config}->httpd_config();
  +
  +    $self->try_exit_opts(@exit_opts_need_httpd);
   
       if ($self->{opts}->{configure}) {
           warning "cleaning out current configuration";
  
  
  

Mime
View raw message