On Wed, 14 Jul 2004, Randy Kobes wrote:
> For making the tests for apr/apr-ext share a common
> base under modperl-2.0/t/lib/TestAPRlib/, one must
> at present 'use lib q(.....)' in the appropriate
> places for both the t/apr/ and t/apr-ext/ tests.
> Would the following patch be OK to add this to
> httpd.conf, so one doesn't have to repeat it?
I forgot one piece - that to add the t/lib to t/TEST,
so that one doesn't have to add it within the t/apr-ext/
tests. Here's a version including that:
===================================================
Index: lib/Apache/TestConfig.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.227
diff -u -r1.227 TestConfig.pm
--- lib/Apache/TestConfig.pm 5 Jul 2004 15:58:00 -0000 1.227
+++ lib/Apache/TestConfig.pm 14 Jul 2004 22:08:10 -0000
@@ -873,11 +873,13 @@
}
}
- for (qw(. ..)) {
- my $dir = canonpath catdir $FindBin::Bin, $_ , "Apache-Test", "lib";
- if (-d $dir) {
- push @dirs, $dir;
- last;
+ for my $d (qw/Apache-Test t/) {
+ for (qw(. ..)) {
+ my $dir = canonpath catdir $FindBin::Bin, $_ , $d, "lib";
+ if (-d $dir) {
+ push @dirs, $dir;
+ last;
+ }
}
}
Index: lib/Apache/TestConfigPerl.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.89
diff -u -r1.89 TestConfigPerl.pm
--- lib/Apache/TestConfigPerl.pm 28 Apr 2004 18:03:41 -0000 1.89
+++ lib/Apache/TestConfigPerl.pm 14 Jul 2004 22:08:10 -0000
@@ -183,6 +183,10 @@
next unless $_;
print $fh "use lib '$_';\n";
}
+ my $tlib = catfile $self->{vars}->{t_dir}, 'lib';
+ if (-d $tlib) {
+ print $fh "use lib '$tlib';\n";
+ }
my $fixup = Apache::TestConfig->modperl_2_inc_fixup();
print $fh $fixup;
==============================================================
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]