Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 27390 invoked by uid 500); 14 Jan 2002 03:24:44 -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 27379 invoked from network); 14 Jan 2002 03:24:43 -0000 Message-ID: <3C424F79.9040102@stason.org> Date: Mon, 14 Jan 2002 11:24:41 +0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en-us MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: multiple configurations References: <20020110201158.D18540@sumthin.nu> 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 Rick Myers wrote: > This may sound silly, but is there an *easy* way to test > multiple server config's? > > For example, I have a perl module that defines a new > RSRC_CONF directive that I want to test in every possible > way. To do that I need one server with no use of the module > (to validate the test, I guess), one server that uses the > directive in only the global area, and others for various > combinations of global vs. virtual use. > > The only way I can see to make this happen is to write > various extra .conf.in's and remove includes from the > httpd.conf file as each test runs. To make it work I have to > HUP the server after editing httpd.conf in each test, but > while using -X the server just dies. > > I managed to figure out a way around -X and keep the server > alive beyond the HUP, but it's a real pain. The end result > is overloading Apache::Test::config, > Apache::TestConfig::new_test_server, and > Apache::TestRunPerl::new_test_config -- all just to get back > to the point where I can finally overload > Apache::TestServer::start_cmd and leave out the $one. > > Thoughts? I think you can do it using a set of a several .pm response handlers. Since the __DATA__ section is used to configure the server for the handler in the same file, you could write a single handler and then create a number of .pm files each having a different config section in its __DATA__ section as a virtual host, so they can all co-exist in the without restarting the server. Another alternative I can think of is writing one big .conf.in file with sections and allow t/TEST to have path-thru options to enable -D flags, so without changing the configuration you could run: t/TEST -Done; t/TEST -Dtwo; t/TEST -Dthree; _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/