Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 21599 invoked by uid 500); 12 Dec 2002 10:10:21 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 21577 invoked from network); 12 Dec 2002 10:10:20 -0000 Date: 12 Dec 2002 10:10:19 -0000 Message-ID: <20021212101019.75021.qmail@icarus.apache.org> From: stas@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm TestRunPerl.pm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 {