From test-dev-return-1969-apmail-httpd-test-dev-archive=httpd.apache.org@httpd.apache.org Fri Oct 03 13:33:22 2003 Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 19714 invoked from network); 3 Oct 2003 13:33:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Oct 2003 13:33:22 -0000 Received: (qmail 26243 invoked by uid 500); 3 Oct 2003 13:33:18 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 26195 invoked by uid 500); 3 Oct 2003 13:33:18 -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 26182 invoked from network); 3 Oct 2003 13:33:17 -0000 Received: from unknown (HELO secure.exclamationlabs.net) (66.77.29.186) by daedalus.apache.org with SMTP; 3 Oct 2003 13:33:17 -0000 Received: from modperlcookbook.org (pcp04156113pcs.walngs01.pa.comcast.net [68.81.89.216]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id h93DXIr32700 for ; Fri, 3 Oct 2003 08:33:18 -0500 Message-ID: <3F7D7AB6.6040909@modperlcookbook.org> Date: Fri, 03 Oct 2003 09:33:42 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: using TestRunPerl without mod_perl.c References: <3F7C7E1E.1040003@modperlcookbook.org> <3F7C8BAA.8020008@stason.org> <3F7C92E8.4050409@modperlcookbook.org> <3F7C9AE8.6090108@stason.org> In-Reply-To: <3F7C9AE8.6090108@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > TestRunPerl implies that mod_perl is available. If it is not, > TestRunPerl should abort *before* it creates the config file, telling > user to use a mod_perl enabled server. I don't think it needs to be that way, and I'm not even sure it's a good idea. here's why... I may have a distribution that has parts that can work in both environments. say I'm writing a test for CGI.pm - I maybe want to have tests that use no server (generate HTML foo), then test stuff like $q->param, which behaves differently under mod_perl and mod_cgi. TestRunPerl is useful for configuring the mod_perl part of the server, but I don't necessarily want the _entire test suite_ to blow up just because mod_perl isn't in the httpd the user provided - there are still at least two parts of the module I can test. granted, with something as simple as CGI.pm I may not need the mod_perl widgets, but for other, more elaborate, modules I may. and the functionality for configuring mod_perl widgets is right there in TestRunPerl - no need for me to do it myself, either manually or through a subclass. now, say you have a mod_perl-only module, like some of the ones we have both written. you have a choice: you either want the tests to fail if mod_perl isn't present (like you do) or you want the tests to skip (like I do). the patch I have proposed allows both to coexist. for me, I can do plan tests => 1, have_module('mod_perl.c'); while you can do die unless have_module('mod_perl.c'); plan tests => 1; the end result is that everybody can achieve the behavior they want, which is kinda what Perl is all about :) > > There is nothing wrong with your patch, but it hides the problem instead > of fixing it. we clearly have different views of the problem. I think that Apache-Test should provide the tools to configure a server and run the tests, leaving it up to the tests to decide what fails and what passes. by making TestRunPerl (or anything else, for that matter) abort if a specific httpd module isn't found, you are taking away flexibility that would benefit test authors. in other words, Apache-Test should provide tools to make creating a test enviroment easier, not make decisions about whether 'make test' passes or fails. --Geoff