perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/hooks/TestHooks startup.pm
Date Mon, 05 Jan 2004 20:13:53 GMT
stas        2004/01/05 12:13:53

  Modified:    t/conf   modperl_extra.pl
               t/hooks/TestHooks startup.pm
  Log:
  cleanup files for TestHooks::startup in modperl_extra.pl
  which can't be done from the
  test itself because the files are created at the server startup and
  the test needing these files may run more than once (t/SMOKE)
  
  Revision  Changes    Path
  1.36      +13 -1     modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -u -r1.35 -r1.36
  --- modperl_extra.pl	10 Oct 2003 22:48:59 -0000	1.35
  +++ modperl_extra.pl	5 Jan 2004 20:13:53 -0000	1.36
  @@ -1,6 +1,6 @@
   use Socket (); #test DynaLoader vs. XSLoader workaround for 5.6.x
   use IO::File ();
  -use File::Spec::Functions qw(canonpath);
  +use File::Spec::Functions qw(canonpath catdir);
   
   use Apache2 ();
   
  @@ -79,6 +79,18 @@
   # attempt to use perl's mip  early
   Apache->server->add_config(['<Perl >', '1;', '</Perl>']);
   
  +# cleanup files for TestHooks::startup which can't be done from the
  +# test itself because the files are created at the server startup and
  +# the test needing these files may run more than once (t/SMOKE)
  +{
  +    require Apache::Test;
  +    my $dir = catdir Apache::Test::config()->{vars}->{documentroot}, 'hooks',
  +        'startup';
  +    for (<$dir/*>) {
  +        my $file = ($_ =~ /(.*(?:open_logs|post_config)-\d+)/);
  +        unlink $file;
  +    }
  +}
   
   # this is needed for TestModperl::ithreads
   # one should be able to boot ithreads at the server startup and then
  
  
  
  1.2       +3 -2      modperl-2.0/t/hooks/TestHooks/startup.pm
  
  Index: startup.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/startup.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- startup.pm	23 Dec 2003 00:31:03 -0000	1.1
  +++ startup.pm	5 Jan 2004 20:13:53 -0000	1.2
  @@ -90,8 +90,9 @@
           my $received = <$fh> || '';
           close $fh;
   
  -        # cleanup
  -        unlink $file;
  +        # can't cleanup the file here, because t/SMOKE may run this
  +        # test more than once, so we cleanup on startup in modperl_extra.pl
  +        # unlink $file;
   
           if ($expected eq $received) {
               $r->print("$phase ok\n");
  
  
  

Mime
View raw message