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 README
Date Wed, 05 Dec 2001 09:20:02 GMT
stas        01/12/05 01:20:02

  Modified:    perl-framework/Apache-Test/lib/Apache TestServer.pm
               perl-framework/Apache-Test README
  Log:
  under the batch mode, don't use \r and try to print only the useful info.
  
  Revision  Changes    Path
  1.44      +12 -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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TestServer.pm	2001/12/05 08:58:04	1.43
  +++ TestServer.pm	2001/12/05 09:20:02	1.44
  @@ -10,6 +10,8 @@
   use Apache::TestTrace;
   use Apache::TestConfig ();
   
  +my $CTRL_M = $ENV{APACHE_TEST_NO_COLOR} ? "\n" : "\r";
  +
   # some debuggers use the same syntax as others, so we reuse the same
   # code by using the following mapping
   my %debuggers = (
  @@ -429,10 +431,12 @@
       my $timeout = 60; # secs XXX: make a constant?
   
       my $start_time = time;
  -    my $preamble = "\rwaiting for server to start: ";
  +    my $preamble = "${CTRL_M}waiting for server to start: ";
       while (1) {
           my $delta = time - $start_time;
  -        print $preamble, sprintf "%02d:%02d", (gmtime $delta)[1,0];
  +        unless ($ENV{APACHE_TEST_NO_COLOR}) {
  +            print $preamble, sprintf "%02d:%02d", (gmtime $delta)[1,0];
  +        }
           sleep 1;
           if ($self->pid) {
               print $preamble, "ok (waited $delta secs)\n";
  @@ -487,17 +491,19 @@
       }
   
       my $start_time = time;
  -    my $preamble = "\rstill waiting for server to warm up: ";
  +    my $preamble = "${CTRL_M}still waiting for server to warm up: ";
       while (1) {
           my $delta = time - $start_time;
  -        print $preamble, sprintf "%02d:%02d", (gmtime $delta)[1,0];
  +        unless ($ENV{APACHE_TEST_NO_COLOR}) {
  +            print $preamble, sprintf "%02d:%02d", (gmtime $delta)[1,0];
  +        }
           sleep $sleep_interval;
           if ($server_up->()) {
  -            print "\rthe server is up (waited $delta secs)             \n";
  +            print "${CTRL_M}the server is up (waited $delta secs)             \n";
               return 1;
           }
           elsif ($delta > $timeout) {
  -            print "\rthe server is down, giving up after $delta secs\n";
  +            print "${CTRL_M}the server is down, giving up after $delta secs\n";
               return 0;
           }
       }
  
  
  
  1.18      +9 -1      httpd-test/perl-framework/Apache-Test/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/README,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- README	2001/12/05 08:23:06	1.17
  +++ README	2001/12/05 09:20:02	1.18
  @@ -128,7 +128,15 @@
   % t/TEST -proxy
   
   ----------------------------------------------------------------------
  -Stress testing
  +Batch mode:
  +
  +When running in the batch mode and logging to a file set the
  +APACHE_TEST_NO_COLOR=1 env var, to avoid spurious prints, used during
  +interactive run.
  +
  +
  +----------------------------------------------------------------------
  +Stress testing:
   
   run all tests 10 times in a random order (the seed is autogenerated
   and reported) 
  
  
  

Mime
View raw message