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 TestServer.pm
Date Tue, 21 Jan 2003 05:54:51 GMT
stas        2003/01/20 21:54:51

  Modified:    perl-framework/Apache-Test/lib/Apache TestServer.pm
  Log:
  support the valgrind leak detector
  Submitted by:	Philippe M. Chiasson <gozer@eXtropia.com>
  Reviewed by:	stas
  
  Revision  Changes    Path
  1.61      +25 -3     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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- TestServer.pm	1 Jul 2002 08:11:50 -0000	1.60
  +++ TestServer.pm	21 Jan 2003 05:54:51 -0000	1.61
  @@ -18,9 +18,10 @@
   # some debuggers use the same syntax as others, so we reuse the same
   # code by using the following mapping
   my %debuggers = (
  -    gdb    => 'gdb',
  -    ddd    => 'gdb',
  -    strace => 'strace',
  +    gdb      => 'gdb',
  +    ddd      => 'gdb',
  +    valgrind => 'valgrind',
  +    strace   => 'strace',
   );
   
   sub new {
  @@ -124,6 +125,27 @@
       my($self, $strace, $file) = @_;
       #XXX truss, ktrace, etc.
       "$strace -f -o $file -s1024";
  +}
  +
  +sub valgrind_cmd {
  +    my($self, $valgrind) = @_;
  +    "$valgrind -v --leak-check=yes --show-reachable=yes";
  +}
  +
  +sub start_valgrind {
  +    my $self = shift;
  +    my $opts = shift;
  +
  +    my $config       = $self->{config};
  +    my $args         = $self->args;
  +    my $one_process  = $self->version_of(\%one_process);
  +    my $valgrind_cmd = $self->valgrind_cmd($opts->{debugger});
  +    my $httpd        = $config->{vars}->{httpd};
  +
  +    my $command = "$valgrind_cmd $httpd $one_process $args";
  +
  +    debug $command;
  +    system $command;
   }
   
   sub start_strace {
  
  
  

Mime
View raw message