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/01/14 07:44:10 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm TestConfigParse.pm TestConfigPerl.pm TestServer.pm

stas        02/01/13 22:44:10

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
                        TestConfigParse.pm TestConfigPerl.pm TestServer.pm
  Log:
  - use Apache::TestTrace for tracing, instead of defining and using local
  tracing functions.
  
  Revision  Changes    Path
  1.121     +6 -12     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- TestConfig.pm	10 Jan 2002 23:50:55 -0000	1.120
  +++ TestConfig.pm	14 Jan 2002 06:44:10 -0000	1.121
  @@ -588,7 +588,7 @@
       for (@trys) {
           my $file = catfile $_, $module;
           if (-e $file) {
  -            $self->trace("found $module => $file");
  +            debug "found $module => $file";
               return $file;
           }
       }
  @@ -667,7 +667,7 @@
   sub genfile_trace {
       my($self, $file) = @_;
       my $name = abs2rel $file, $self->{vars}->{t_dir};
  -    $self->trace("generating $name");
  +    debug "generating $name";
   }
   
   sub genfile_warning {
  @@ -774,11 +774,11 @@
   
       for (keys %{ $self->{clean}->{files} }) {
           if (-e $_) {
  -            $self->trace("unlink $_");
  +            debug "unlink $_";
               unlink $_;
           }
           else {
  -            $self->trace("unlink $_: $!");
  +            debug "unlink $_: $!";
           }
       }
   
  @@ -791,7 +791,7 @@
               my $notempty = grep { ! /^\.{1,2}$/ } readdir $dh;
               closedir $dh;
               next if $notempty;
  -            $self->trace("rmdir $_");
  +            debug "rmdir $_";
               rmdir $_;
           }
       }
  @@ -1183,12 +1183,6 @@
   
   #utils
   
  -sub trace {
  -    my $self = shift;
  -    return unless $self->{verbose};
  -    print "@_\n";
  -}
  -
   #duplicating small bits of Apache::Build so we dont require it
   sub which {
       foreach (map { catfile $_, $_[0] } File::Spec->path) {
  @@ -1289,7 +1283,7 @@
       my $file = catfile $self->{vars}->{t_conf}, "$name.pm";
       my $fh = $self->genfile($file);
   
  -    $self->trace("saving config data to $name.pm");
  +    debug "saving config data to $name.pm";
   
       (my $obj = $self->freeze) =~ s/^/    /;
   
  
  
  
  1.20      +6 -3      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm
  
  Index: TestConfigParse.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- TestConfigParse.pm	10 Jan 2002 17:57:19 -0000	1.19
  +++ TestConfigParse.pm	14 Jan 2002 06:44:10 -0000	1.20
  @@ -5,6 +5,9 @@
   
   use strict;
   use warnings FATAL => 'all';
  +
  +use Apache::TestTrace;
  +
   use File::Spec::Functions qw(rel2abs splitdir);
   use File::Basename qw(basename);
   
  @@ -84,14 +87,14 @@
           my $file = $self->server_file_rel2abs($args->[1]);
   
           unless (-e $file) {
  -            $self->trace("$file does not exist, skipping LoadModule");
  +            debug "$file does not exist, skipping LoadModule";
               next;
           }
   
           my $name = basename $args->[1];
           $name =~ s/\.s[ol]$/.c/;  #mod_info.so => mod_info.c
           $name =~ s/^lib/mod_/; #libphp4.so => mod_php4.c
  -        $self->trace("LoadModule $modname $name");
  +        debug "LoadModule $modname $name";
           $name = $modname_alias{$name} if $modname_alias{$name};
           $self->{modules}->{$name} = 1;
   
  @@ -147,7 +150,7 @@
   
       return unless $file;
   
  -    $self->trace("inheriting config file: $file");
  +    debug "inheriting config file: $file";
   
       my $fh = Symbol::gensym();
       open($fh, $file) or return;
  
  
  
  1.44      +2 -2      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TestConfigPerl.pm	20 Dec 2001 03:51:11 -0000	1.43
  +++ TestConfigPerl.pm	14 Jan 2002 06:44:10 -0000	1.44
  @@ -35,7 +35,7 @@
       else {
           my $msg = "unable to locate $libname\n";
           $cfg = "#$msg";
  -        $self->trace($msg);
  +        debug $msg;
       }
       $self->preamble(IfModule => '!mod_perl.c', $cfg);
   }
  @@ -302,7 +302,7 @@
                   $handler =~ s/response//i; #s/PerlResponseHandler/PerlHandler/
               }
   
  -            $self->trace("configuring $module");
  +            debug "configuring $module";
   
               if (my $cv = $add_hook_config{$hook}) {
                   $self->$cv($module, \@args);
  
  
  
  1.52      +1 -5      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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- TestServer.pm	6 Jan 2002 07:30:31 -0000	1.51
  +++ TestServer.pm	14 Jan 2002 06:44:10 -0000	1.52
  @@ -23,10 +23,6 @@
       strace => 'strace',
   );
   
  -sub trace {
  -    shift->{config}->trace(@_);
  -}
  -
   sub new {
       my $class = shift;
       my $config = shift;
  @@ -65,7 +61,7 @@
       for (@apache_logs) {
           my $file = catfile $dir, $_;
           if (unlink $file) {
  -            $self->trace("unlink $file");
  +            debug "unlink $file";
           }
       }
   }