You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2002/03/07 06:20:18 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm

stas        02/03/06 21:20:18

  Modified:    perl-framework/Apache-Test/lib/Apache TestRun.pm
  Log:
  - add a command line interface for changing tracing level
  
  Revision  Changes    Path
  1.86      +14 -1     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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- TestRun.pm	16 Jan 2002 17:05:20 -0000	1.85
  +++ TestRun.pm	7 Mar 2002 05:20:18 -0000	1.86
  @@ -24,7 +24,7 @@
   my @std_run      = qw(start-httpd run-tests stop-httpd);
   my @others       = qw(verbose configure clean help ssl http11);
   my @flag_opts    = (@std_run, @others);
  -my @string_opts  = qw(order);
  +my @string_opts  = qw(order trace);
   my @ostring_opts = qw(proxy ping);
   my @debug_opts   = qw(debug);
   my @num_opts     = qw(times);
  @@ -53,6 +53,7 @@
      'http11'          => 'run all tests with HTTP/1.1 (keep alive) requests',
      'ssl'             => 'run tests through ssl',
      'proxy'           => 'proxy requests (default proxy is localhost)',
  +   'trace=T'         => 'change tracing default to: warning, notice, info, debug, ...',
      (map { $_, "\U$_\E url" } @request_opts),
   );
   
  @@ -207,6 +208,18 @@
       if (exists $opts{debug}) {
           $opts{debugger} = $opts{debug};
           $opts{debug} = 1;
  +    }
  +
  +    if ($opts{trace}) {
  +        my %levels = map {$_ => 1} @Apache::TestTrace::Levels;
  +        if (exists $levels{ $opts{trace} }) {
  +            $Apache::TestTrace::Level = $opts{trace};
  +        }
  +        else {
  +            error "unknown trace level: $opts{trace}",
  +                "valid levels are: @Apache::TestTrace::Levels";
  +            exit_perl 0;
  +        }
       }
   
       # breakpoint automatically turns the debug mode on