On Saturday, August 14, 2010 05:23:09 Fred Moyer wrote: > 2010/8/13 Torsten Förtsch <torsten.foert...@gmx.net>: > > I am trying to compile/test trunk with a freshly compiled perl and > > apache. There hasn't been installed a modperl nor A::T/A::R/A::SL for > > this perl. > > Hmm, nice catch. Can we do something similar to Apache::Test for this > where it uses a bundled test package?
This is nasty! TestHarness checks for the existence of "A-T/lib" and "lib" already to find Apache::Test when it runs from the perl-framework (the apache test suite) and when it wants to test A::T itself. This patch adds one more special case. But it is the natural way to solve the "Can't locate Apache/Test.pm" issue for A::R/t/all.t. One thing it didn't know yet is that all.t is a special name. This test is run twice. Only the first time it choked about @INC. On the other hand, since it chokes only when it is called from Apache::TestHarness->prune and since it is special either all.t could modify its @INC or prune() could be made smarter. Please comment! Further, I have noticed a small inconsistency in http://perl.apache.org/docs/general/testing/testing.html. It says that all.t is special. But the code checks for /\Wall\.t$/. So, 0-all.t and similar are also special. Is that a bug in the code or in testing.html? Index: lib/Apache/TestHarness.pm =================================================================== --- lib/Apache/TestHarness.pm (revision 985316) +++ lib/Apache/TestHarness.pm (working copy) @@ -74,6 +74,7 @@ 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) { Index: lib/Apache/TestConfig.pm =================================================================== --- lib/Apache/TestConfig.pm (revision 985316) +++ lib/Apache/TestConfig.pm (working copy) @@ -35,7 +35,8 @@ 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'; Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org For additional commands, e-mail: dev-h...@perl.apache.org