Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 95637 invoked from network); 8 Jan 2004 11:49:44 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Jan 2004 11:49:44 -0000 Received: (qmail 23972 invoked by uid 500); 8 Jan 2004 11:49:44 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 23861 invoked by uid 500); 8 Jan 2004 11:49:43 -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 23847 invoked from network); 8 Jan 2004 11:49:43 -0000 Received: from unknown (HELO ms-smtp-03-eri0.southeast.rr.com) (24.25.9.102) by daedalus.apache.org with SMTP; 8 Jan 2004 11:49:43 -0000 Received: from vulcan.knowmad.com (clt74-109-241.carolina.rr.com [24.74.109.241]) by ms-smtp-03-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id i08Bneov029502 for ; Thu, 8 Jan 2004 06:49:40 -0500 (EST) Received: from zeus ([192.168.1.5] ident=mail) by vulcan.knowmad.com with esmtp (Exim 3.35 #1 (Debian)) id 1AeYfS-0003w9-00 for ; Thu, 08 Jan 2004 06:49:38 -0500 Received: from william by zeus with local (Exim 3.36 #1 (Debian)) id 1AeYfQ-0002El-00 for ; Thu, 08 Jan 2004 06:49:36 -0500 Date: Thu, 8 Jan 2004 06:49:35 -0500 From: William McKee To: test-dev@httpd.apache.org Subject: Perl test framework, TestConfig, and debugging A::T Message-ID: <20040108114934.GK753@knowmad.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Hi all, I'm still working on getting my test environment in place using Apache::Test. Recently, I added a vhost section to my extra.conf.in file. The test servers fire up as I would expect on ports 8529 and 8530 when I run `t/TEST -start`. However, following the instructions on the perl.apache.org testing page[1], I am unable to retrieve the port number of the second server. I looked into the source of Apache::TestRequest and can see where the hostport function is trying to search $config->{vhosts} to get the hostport for the module in question. I dumped $config and my vhosts key contains an empty hashref :(. After a bit of thinking, I realized that my VirtualHost directives are being included from another file as follows: include /home/quicktel/QT-Web/conf/quicktel-ssl.conf Putting the contents of the include file directly into the extra.conf.in didn't work either. However, while testing these variations, instead of stopping and restarting the server, I started to have each test independently startup the server so that my changes to extra.conf.in would get parsed and loaded by the Apache test server. While doing so, I noticed that the vhosts hash on the $config object is populated. It doesn't matter whether the VirtualHost is inside of an include or not. So now I'm wondering if there is any way to get the vhost info without having fire up a new server on every test. I can see where that info would get "lost" when running the servers separately from the tests. Is there anyway to reparse the config files using Apache::TestConfig to gather that port number again or must I manually parse the extra.conf file which contains the assigned port number for my vhost? While tracking down the problem, I used the perl debugger to try to find where Apache::Config was going astray but kept getting to the exec $cmd at line 570 of Apache::TestRun which fires off a command that I can't follow using the debugger. Is there another way to debug Apache::Test? Can I set an environment variable that will prevent this second execution of the TEST script? Thanks, William [1] http://perl.apache.org/docs/general/testing/testing.html#Virtual_Hosts -- Knowmad Services Inc. http://www.knowmad.com