Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 3861 invoked from network); 16 Jan 2004 18:03:08 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Jan 2004 18:03:08 -0000 Received: (qmail 89317 invoked by uid 500); 16 Jan 2004 18:03:00 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 89285 invoked by uid 500); 16 Jan 2004 18:02:59 -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 89270 invoked from network); 16 Jan 2004 18:02:59 -0000 Received: from unknown (HELO ms-smtp-01-eri0.southeast.rr.com) (24.25.9.100) by daedalus.apache.org with SMTP; 16 Jan 2004 18:02:59 -0000 Received: from vulcan.knowmad.com (clt74-109-241.carolina.rr.com [24.74.109.241]) by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id i0GI30KY000187 for ; Fri, 16 Jan 2004 13:03:01 -0500 (EST) Received: from zeus ([192.168.1.5] ident=mail) by vulcan.knowmad.com with esmtp (Exim 3.35 #1 (Debian)) id 1AhYJA-0003j8-00 for ; Fri, 16 Jan 2004 13:03:00 -0500 Received: from william by zeus with local (Exim 3.36 #1 (Debian)) id 1AhYJA-0002pQ-00 for ; Fri, 16 Jan 2004 13:03:00 -0500 Date: Fri, 16 Jan 2004 13:03:00 -0500 From: William McKee To: test-dev@httpd.apache.org Subject: Re: Perl test framework, TestConfig, and debugging A::T Message-ID: <20040116180300.GF27102@knowmad.com> References: <3FFDC447.8000201@stason.org> <20040113012556.GC4103@knowmad.com> <40058FCC.1010203@stason.org> <20040114191728.GH25680@knowmad.com> <400596A9.90307@stason.org> <20040115031839.GH27102@knowmad.com> <400619DD.5020207@stason.org> <20040115045730.GK27102@knowmad.com> <4006F187.6090103@stason.org> <40072F49.9000400@stason.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40072F49.9000400@stason.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: Symantec AntiVirus Scan Engine 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 On Thu, Jan 15, 2004 at 04:24:41PM -0800, Stas Bekman wrote: > I don't have apache 1.3 with ssl so I can't test it. And it doesn't quite > work with apache/mp 2.0 because you have hardcoded mp1 API. Please see the > porting doc: http://perl.apache.org/docs/2.0/user/porting/porting.html > http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version Oops. Nice info in the links. > Also you may want to adopt the convention we use for other test suites, > where the response part of the test resides under t/response. So you > usually don't test the module as is, but you create a response handler that > tests it. But it doesn't have to be that way of course. OK. FYI, I didn't see anything about this in the docs. I looked at the t/ dir in Apache::Test and only see request.t and ping.t. The extra.conf.in was basically empty. Which other test suites did you have in mind? > Now to your issues: > > > - APACHE_TEST_LIVE_DEV=1 environment > > I have written a test in 02_livedev.t which tests this setting and > > checks that the first directory in @INC does not contain 'blib'. This > > probably isn't a safe test for distribution due to the possibility of > > blib being in someone's path. However, I think it is sufficient for > > debugging purposes. This test fails on my system. > > this is because you are testing in the "wrong" place. APACHE_TEST_LIVE_DEV > affects the server, not the client. It adds 'lib' in modperl_inc.pl which > affects the server. You need to write a response part of the test like we > do in all other test suites and test it there. So in my case the TEST script that runs my tests is acting as the client? I'm not seeing how creating a response handler is going to make this work. Is the response handler setup in the extra.conf.in or with a test? > Yes, I saw that. I think it's a bad idea, since it'll reconfigure the > server every time you run the tests. Usually developers write scripts to > test things, so they can explicitly add -port select if they want to. At > least that's what I do with my tests. OK, just thought I'd see if there were a way to automate things a bit. What do you mean by the server is reconfigured every time? If I'm starting the server on each test, it seems like that would happen whether I specified -port select or not. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com