stas 2003/10/20 13:22:56
Modified: perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
perl-framework/Apache-Test Changes
Log:
in the autogenerated t/conf/modperl_inc.pl don't add the project/lib
directory, unless a special env var APACHE_TEST_LIVE_DEV is true. This
is because some projects change things in project/blib and pushing
project/lib on top of @INC, breaks the test suite for them
Revision Changes Path
1.78 +10 -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.77
retrieving revision 1.78
diff -u -u -r1.77 -r1.78
--- TestConfigPerl.pm 7 Oct 2003 17:44:58 -0000 1.77
+++ TestConfigPerl.pm 20 Oct 2003 20:22:56 -0000 1.78
@@ -81,9 +81,8 @@
my $top = $self->{vars}->{top_dir};
my $inc = $self->{inc};
- my @trys = (catfile($top, 'lib'),
- catfile($top, qw(blib lib)),
- catfile($top, qw(blib arch)));
+ my @trys = (catdir($top, qw(blib lib)),
+ catdir($top, qw(blib arch)));
for (@trys) {
push @$inc, $_ if -d $_;
@@ -160,6 +159,14 @@
}
my $fixup = Apache::TestConfig->modperl_2_inc_fixup();
print $fh $fixup;
+
+ # if Apache::Test is used to develop a project, we want the
+ # project/lib directory to be first in @INC (loaded last)
+ if ($ENV{APACHE_TEST_LIVE_DEV}) {
+ my $dev_lib = catdir $self->{vars}->{top_dir}, "lib";
+ print $fh "use lib '$dev_lib';\n" if -d $dev_lib;
+ }
+
print $fh "1;\n";
}
1.54 +5 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -u -r1.53 -r1.54
--- Changes 20 Oct 2003 20:09:05 -0000 1.53
+++ Changes 20 Oct 2003 20:22:56 -0000 1.54
@@ -8,6 +8,11 @@
=item 1.05-dev
+in the autogenerated t/conf/modperl_inc.pl don't add the project/lib
+directory, unless a special env var APACHE_TEST_LIVE_DEV is true. This
+is because some projects change things in project/blib and pushing
+project/lib on top of @INC, breaks the test suite for them [Stas]
+
TestRun was using httpd.pid file to ensure that the server is killed
before starting it, if the file existed. This was a problem on win32
platforms, where a process scheduler tries to re-use the pids that