Christopher H. Laco wrote:
> What's the best approach to creating a dynamic extra.conf.in?
> 
> Long story longer. When I wrote the A-T tests for a project I'm working
> on, I simple didn't call generate_script() or setup A-T if AxKit wasn't
> installed since that was the only thing I was testing under A-T.

the easiest way to do this is to let A-T run _everything_, both apache- and
non-apache related things.  this works for just about everything, as long as
you have _some_ apache setup around (and is the approach I use most of the
time now).  if you want to skip over AxKit if it's not available then do
something like

  plan tests => 2, need_module('AxKit');

or somesuch from your foo.t files.  now, that won't keep your httpd.conf
from bombing so you can use -D defines to help

<IfModule mod_perl.c>
  <IfDefine AXKIT>
    PerlModule AxKit
  </IfDefine>
</IfModule>

and so on.  then use a custom TEST.PL file to specify your defines:

  if (eval { require 'AxKit' }) {
     Apache::TestRunPerl->new->run(@ARGV, '-defines', 'AXKIT');
  }
  else {
     Apache::TestRunPerl->new->run(@ARGV);
  }

HTH

--Geoff

Reply via email to