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/12/12 11:10:19 UTC

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

stas        2002/12/12 02:10:19

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
                        TestRunPerl.pm
  Log:
  add the extra subdirs of t/response earlier to @INC, so if modperl is
  started earlier than usual (e.g., because of perlloadmodule) the modules
  in these dirs could be found
  
  Revision  Changes    Path
  1.56      +14 -3     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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- TestConfigPerl.pm	4 Dec 2002 03:24:39 -0000	1.55
  +++ TestConfigPerl.pm	12 Dec 2002 10:10:19 -0000	1.56
  @@ -279,6 +279,19 @@
   $hooks{Protocol} = 'ProcessConnection';
   $hooks{Filter}   = 'OutputFilter';
   
  +my @extra_subdirs = qw(Response Protocol Hooks Filter);
  +
  +# add the subdirs to @INC early, in case mod_perl is started earlier
  +sub configure_pm_tests_inc {
  +    my $self = shift;
  +   for my $subdir (@extra_subdirs) {
  +        my $dir = catfile $self->{vars}->{t_dir}, lc $subdir;
  +        next unless -d $dir;
  +
  +        push @{ $self->{inc} }, $dir;
  +    }
  +}
  +
   sub configure_pm_tests {
       my $self = shift;
   
  @@ -290,11 +303,9 @@
           require Apache2;
       }
   
  -    for my $subdir (qw(Response Protocol Hooks Filter)) {
  +    for my $subdir (@extra_subdirs) {
           my $dir = catfile $self->{vars}->{t_dir}, lc $subdir;
           next unless -d $dir;
  -
  -        push @{ $self->{inc} }, $dir;
   
           finddepth(sub {
               return unless /\.pm$/;
  
  
  
  1.8       +3 -2      httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm
  
  Index: TestRunPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestRunPerl.pm	14 May 2002 22:48:34 -0000	1.7
  +++ TestRunPerl.pm	12 Dec 2002 10:10:19 -0000	1.8
  @@ -19,8 +19,9 @@
       $test_config->preamble_register(qw(configure_libmodperl));
   
       $test_config->postamble_register(qw(configure_inc
  -                                        configure_pm_tests
  -                                        configure_startup_pl));
  +                                        configure_pm_tests_inc
  +                                        configure_startup_pl
  +                                        configure_pm_tests));
   }
   
   sub configure {