httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: [patch take2] add test skipping reasoning
Date Wed, 07 Nov 2001 20:23:06 GMT
On Thu, 8 Nov 2001, Stas Bekman wrote:
 
> So what do you suggest to write as a reason when mod_foo is not 
> available? As you've mentioned before there could be many reasons (apxs 
> undef'ed, v2 vs v1, etc) and they are definitely not the job of the test 
> to know.

you can do this:

my $reason = $config->{cmodules_disabled}->{'mod_foo.c'} ||
             'mod_foo.c is not installed';

if mod_foo.c is one in c-modules/ the reason will either be 'version x
required' or 'no apxs configured'

> what's the point of 'require mod_foo'?

nothing does that.  it does fall through to 'require foo', i don't see the
harm in that.  maybe one does want to check for a "pragma" module that is
only on CPAN: have_module('enum') will work.  i don't see any conflict
between perl names and apache mod_ names.  but we can worry about that
later.

> that runs the $condition twice. How about:
> 
> my $condition = sub { $perlpod };
> plan tests => @pods + keys(%other_files), skip_unless($condition, "reason");

yeah, that's better.




Mime
View raw message