There are at least two problems with sub-projects which want to have their
own test suite. These problems are relevant to the Apache-Test sub-project
as well:

1. Apache::TestMM's export of MY::test and MY::clean works only once,
   which is the top level. Any other attempts to repeat the import
   elsewhere results in default t/*.t as generated by normal
   ExtUtils::MakeMaker (i.e. MY::test is not seen by 
   ModPerl::MM::WriteMakefile)

  As a temp workaround I've used an explicit aliasing in Makefile.PL's, 
  which allowed me to use t/TEST when 'make test' is called:

use Apache::TestMM;

*MY::test  = \&Apache::TestMM::test;
*MY::clean = \&Apache::TestMM::clean;

but that's not what we want. I'm not sure why MY package can be seen
only in the first caller of Apache::TestMM::import.

2. Apache::Test finds an already installed libmodperl.so and uses it
   in the LoadModule directive in the sub-project's httpd.conf,
   instead of using the one just built under the parent
   directory. I've tried the following workaround, but something else
   is missing since the server doesn't start and doesn't print any
   error or segfaults... it just silently quits.

   This is the workaround I've used.

--- ModPerl-Registry/t/TEST.PL  13 Nov 2001 04:35:26 -0000      1.3
+++ ModPerl-Registry/t/TEST.PL  6 Apr 2002 14:26:51 -0000
@@ -9,7 +9,7 @@
 use Apache::TestRunPerl ();
 
 package MyTest;
-
+use Cwd ();
 our @ISA = qw(Apache::TestRunPerl);
 
 # subclass new_test_config to add some config vars which will be
@@ -17,7 +17,10 @@
 sub new_test_config {
     my $self = shift;
 
+    my $cwd = Cwd::cwd();
+
     $self->{conf_opts}->{maxclients} = 2;
+    $self->{conf_opts}->{libmodperl} = "$cwd/../../src/modules/perl/libmodperl.so";
 
     return $self->SUPER::new_test_config;
 }



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org 
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com  
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to