stas 2003/07/22 04:01:32 Modified: src/docs/general/testing testing.pod Log: a new section: Inheriting from System-wide httpd.conf Revision Changes Path 1.22 +40 -0 modperl-docs/src/docs/general/testing/testing.pod Index: testing.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/general/testing/testing.pod,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- testing.pod 28 May 2003 02:01:28 -0000 1.21 +++ testing.pod 22 Jul 2003 11:01:32 -0000 1.22 @@ -1121,6 +1121,46 @@ =back +=head2 Inheriting from System-wide httpd.conf + +C<Apache::Test> tries to find a global I<httpd.conf> file and inherit +its configuration when autogenerating I<t/conf/httpd.conf>. For +example it picks C<LoadModule> directives. + +It's possible to explicitly specify which file to inherit from using +the C<-httpd_conf> option. For example during the build: + + % perl Makefile.PL -httpd_conf /path/to/httpd.conf + +or during the configuration: + + % t/TEST -conf -httpd_conf /path/to/httpd.conf + +Certain projects need to have a control of what gets inherited. For +example if your global I<httpd.conf> includes a directive: + + LoadModule apreq_module "/home/joe/apache2/modules/mod_apreq.so" + +And you want to run the test suite for C<Apache::Request> 2.0, +inheriting the above directive will load the pre-installed +I<mod_apreq.so> and not the newly built one, which is wrong. In such +cases it's possible to tell the test suite which modules shouldn't be +inheritated. In our example C<Apache-Request> has the following code +in F<t/TEST.PL>: + + use base 'Apache::TestRun'; + $Apache::TestTrace::Level = 'debug'; + main::->new->run(@ARGV); + + sub pre_configure { + my $self = shift; + # Don't load an installed mod_apreq + Apache::TestConfig::autoconfig_skip_module_add('mod_apreq.c'); + } + +it subclasses C<Apache::TestRun> and overrides the I<pre_configure> +method, which excludes the module I<mod_apreq.c> from the list of +inherited modules (notice that the extension is I<.c>). =head1 Apache::Test Framework's Architecture
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]