Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 93347 invoked by uid 500); 7 Nov 2001 20:19:15 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 93336 invoked from network); 7 Nov 2001 20:19:15 -0000 X-Authentication-Warning: mako.covalent.net: dougm owned process doing -bs Date: Wed, 7 Nov 2001 12:23:06 -0800 (PST) From: Doug MacEachern X-Sender: dougm@localhost To: test-dev@httpd.apache.org Subject: Re: [patch take2] add test skipping reasoning In-Reply-To: <3BE990BA.1030005@stason.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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.