perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tors...@apache.org
Subject svn commit: r985658 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestConfig.pm lib/Apache/TestConfigPerl.pm lib/Apache/TestHarness.pm
Date Sun, 15 Aug 2010 11:48:29 GMT
Author: torsten
Date: Sun Aug 15 11:48:28 2010
New Revision: 985658

URL: http://svn.apache.org/viewvc?rev=985658&view=rev
Log:
Provide build/test environment for modules bundled with mod_perl like
Apache::Reload and Apache::SizeLimit

Modified:
    perl/Apache-Test/trunk/Changes
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
    perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm
    perl/Apache-Test/trunk/lib/Apache/TestHarness.pm

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/Changes?rev=985658&r1=985657&r2=985658&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Sun Aug 15 11:48:28 2010
@@ -8,6 +8,10 @@ Changes - Apache::Test change logfile
 
 =item 1.33-dev
 
+Provide build/test environment for modules bundled with mod_perl like
+Apache::Reload and Apache::SizeLimit
+[Torsten Foertsch]
+
 The CN in server certificates generated by Apache::TestSSLCA will now
 match the servername passed to t/TEST.
 [Joe Orton]

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=985658&r1=985657&r2=985658&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Sun Aug 15 11:48:28 2010
@@ -35,7 +35,8 @@ use constant IS_MOD_PERL_2_BUILD => IS_M
     require Apache2::Build && Apache2::Build::IS_MOD_PERL_BUILD();
 
 use constant IS_APACHE_TEST_BUILD =>
-    grep { -e "$_/lib/Apache/TestConfig.pm" } qw(Apache-Test . ..);
+    grep { -e "$_/lib/Apache/TestConfig.pm" }
+         qw(Apache-Test . .. ../Apache-Test);
 
 use constant CUSTOM_CONFIG_FILE => 'Apache/TestConfigData.pm';
 
@@ -295,8 +296,15 @@ sub new {
     $self->add_inc;
 
     #help to find libmodperl.so
-    my $src_dir = catfile $vars->{top_dir}, qw(src modules perl);
-    $vars->{src_dir}      ||= $src_dir if -d $src_dir;
+    unless ($vars->{src_dir}) {
+        my $src_dir = catfile $vars->{top_dir}, qw(.. src modules perl);
+	if (-d $src_dir) {
+	    $vars->{src_dir} = $src_dir;
+	} else {
+	    $src_dir = catfile $vars->{top_dir}, qw(src modules perl);
+	    $vars->{src_dir} = $src_dir if -d $src_dir;
+	}
+    }
 
     $vars->{t_dir}        ||= catfile $vars->{top_dir}, 't';
     $vars->{serverroot}   ||= $vars->{t_dir};

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm?rev=985658&r1=985657&r2=985658&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm Sun Aug 15 11:48:28 2010
@@ -105,11 +105,20 @@ sub configure_inc {
     my $top = $self->{vars}->{top_dir};
 
     my $inc = $self->{inc};
-    my @trys = (catdir($top, qw(blib lib)),
-                catdir($top, qw(blib arch)));
 
-    for (@trys) {
-        push @$inc, $_ if -d $_;
+    my $found;
+    for (catdir($top, qw(blib lib)), catdir($top, qw(blib arch))) {
+        if (-d $_) {
+	    push @$inc, $_;
+	    $found=1;
+	}
+    }
+
+    # try ../blib as well for Apache::Reload & Co
+    unless ($found) {
+        for (catdir($top, qw(.. blib lib)), catdir($top, qw(.. blib arch))) {
+	    push @$inc, $_ if -d $_;
+	}
     }
 
     # spec: If PERL5LIB is defined, PERLLIB is not used.

Modified: perl/Apache-Test/trunk/lib/Apache/TestHarness.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestHarness.pm?rev=985658&r1=985657&r2=985658&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestHarness.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestHarness.pm Sun Aug 15 11:48:28 2010
@@ -74,6 +74,7 @@ sub run_t {
         my $top_dir = Apache::Test::vars('top_dir');
 
         foreach my $lib (catfile($top_dir, qw(Apache-Test lib)),
+                         catfile($top_dir, qw(.. Apache-Test lib)),
                          catfile($top_dir, 'lib')) {
 
             if (-d $lib) {



Mime
View raw message