You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by ge...@apache.org on 2005/07/22 16:17:50 UTC
svn commit: r220325 - in /perl/Apache-Test/trunk: Changes
lib/Apache/TestConfig.pm
Author: geoff
Date: Fri Jul 22 07:17:48 2005
New Revision: 220325
URL: http://svn.apache.org/viewcvs?rev=220325&view=rev
Log:
more remnants of Apache2.pm-type logic...
make sure that simply a require of mp2 things doesn't
mean that we're running in a mp2 environment
similar to matt's trouble, I couldn't even configure
a mp1 static build without mod_so since when -apxs
wasn't specified it was resorting to Apache2::Build
to find it, which pulled apxs from my mp2 build.
Modified:
perl/Apache-Test/trunk/Changes
perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=220325&r1=220324&r2=220325&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Fri Jul 22 07:17:48 2005
@@ -9,7 +9,7 @@
=item 1.26-dev
make sure mp2 loading doesn't make it impossible to complete
-mp1 runs. [Matt Sergeant]
+mp1 runs. [Matt Sergeant, Geoffrey Young]
add Apache::TestConfigParrot and Apache::TestRunParrot to
support mod_parrot server-side testing [Geoffrey Young]
Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=220325&r1=220324&r2=220325&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Fri Jul 22 07:17:48 2005
@@ -174,14 +174,24 @@
sub modperl_build_config {
+ my $self = shift;
+
# we don't want to get mp2 preconfigured data in order to be able
# to get the interactive tests running.
return undef if $ENV{APACHE_TEST_INTERACTIVE_CONFIG_TEST};
- eval {
- require Apache2::Build;
- } or return undef;
- return Apache2::Build->build_config;
+ # we can't do this if we're using httpd 1.3.X
+ # even if mod_perl2 is installed on the box
+ # similarly, we shouldn't be loading mp2 if we're not
+ # absolutely certain we're in a 2.X environment yet
+ if ($self->server->{rev} && $self->server->{rev} == 2) {
+ eval {
+ require Apache2::Build;
+ } or return;
+ return Apache2::Build->build_config;
+ }
+
+ return;
}
sub new_test_server {
@@ -357,7 +367,7 @@
# continue because the interactive config can't work with
# mod_perl 2.0 build (by design)
if (IS_MOD_PERL_2_BUILD){
- my $mp2_build = modperl_build_config();
+ my $mp2_build = $self->modperl_build_config();
# if mod_perl 2 was built against the httpd source it
# doesn't know where to find apxs/httpd, so in this case
# fall back to interactive config
@@ -682,7 +692,7 @@
return $self->{vars}->{apxs} if $self->{vars}->{apxs};
- if (my $build_config = modperl_build_config()) {
+ if (my $build_config = $self->modperl_build_config()) {
return $build_config->{MP_APXS};
}
@@ -690,9 +700,11 @@
}
sub default_httpd {
- my $vars = shift->{vars};
+ my $self = shift;
+
+ my $vars = $self->{vars};
- if (my $build_config = modperl_build_config()) {
+ if (my $build_config = $self->modperl_build_config()) {
if (my $p = $build_config->{MP_AP_PREFIX}) {
for my $bindir (qw(bin sbin)) {
my $httpd = catfile $p, $bindir, $vars->{target};