Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@www.apache.org Received: (qmail 66008 invoked from network); 1 Apr 2004 23:57:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Apr 2004 23:57:18 -0000 Received: (qmail 21158 invoked by uid 500); 1 Apr 2004 23:57:04 -0000 Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 21137 invoked by uid 500); 1 Apr 2004 23:57:04 -0000 Mailing-List: contact test-cvs-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-cvs@httpd.apache.org Received: (qmail 21113 invoked from network); 1 Apr 2004 23:57:03 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 1 Apr 2004 23:57:03 -0000 Received: (qmail 65989 invoked by uid 1085); 1 Apr 2004 23:57:17 -0000 Date: 1 Apr 2004 23:57:17 -0000 Message-ID: <20040401235717.65988.qmail@minotaur.apache.org> From: coar@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm TestConfigParse.pm 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 coar 2004/04/01 15:57:17 Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm TestConfigParse.pm Log: add an '-httpd_conf_extra ' option to allow an *additional* server config file to be inherited as well as the server's main one (or one specified with -httpd_conf). Reviewed by: stas Revision Changes Path 1.217 +3 -2 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Index: TestConfig.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.216 retrieving revision 1.217 diff -u -u -r1.216 -r1.217 --- TestConfig.pm 1 Apr 2004 18:56:21 -0000 1.216 +++ TestConfig.pm 1 Apr 2004 23:57:17 -0000 1.217 @@ -72,6 +72,7 @@ apxs => 'location of apxs (default is from Apache::BuildConfig)', startup_timeout => 'seconds to wait for the server to start (default is 60)', httpd_conf => 'inherit config from this file (default is apxs derived)', + httpd_conf_extra=> 'inherit additional config from this file', maxclients => 'maximum number of concurrent clients (default is 1)', perlpod => 'location of perl pod documents (for testing downloads)', proxyssl_url => 'url for testing ProxyPass / https (default is localhost)', @@ -84,8 +85,8 @@ my %filepath_conf_opts = map { $_ => 1 } qw(top_dir t_dir t_conf t_logs t_conf_file src_dir serverroot - documentroot bindir sbindir httpd apxs httpd_conf perlpod sslca - libmodperl); + documentroot bindir sbindir httpd apxs httpd_conf httpd_conf_extra + perlpod sslca libmodperl); sub conf_opt_is_a_filepath { my $opt = shift; 1.44 +13 -2 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm Index: TestConfigParse.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -u -u -r1.43 -r1.44 --- TestConfigParse.pm 4 Mar 2004 05:51:31 -0000 1.43 +++ TestConfigParse.pm 1 Apr 2004 23:57:17 -0000 1.44 @@ -302,6 +302,7 @@ catfile $self->{httpd_basedir}, 'htdocs'; my $file = $self->{vars}->{httpd_conf}; + my $extra_file = $self->{vars}->{httpd_conf_extra}; unless ($file and -e $file) { if (my $base = $self->{httpd_basedir}) { @@ -313,7 +314,16 @@ } } - return unless $file; + unless ($extra_file and -e $extra_file) { + if ($extra_file and my $base = $self->{httpd_basedir}) { + my $default_conf = catfile qw(conf $extra_file); + $extra_file = catfile $base, $default_conf; + # SERVER_CONFIG_FILE might be an absolute path + $extra_file = $default_conf if !-e $extra_file and -e $default_conf; + } + } + + return unless $file or $extra_file; my $c = $self->{inherit_config}; @@ -324,7 +334,8 @@ } } - $self->inherit_config_file_or_directory($file); + $self->inherit_config_file_or_directory($file) if $file; + $self->inherit_config_file_or_directory($extra_file) if $extra_file; #apply what we parsed while (my($spec, $wanted) = each %wanted_config) {