[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-test-cvs
Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm TestConfigParse.pm
From: coar () apache ! org
Date: 2004-04-01 23:57:17
Message-ID: 20040401235717.65988.qmail () minotaur ! apache ! org
[Download RAW message or body]
coar 2004/04/01 15:57:17
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
TestConfigParse.pm
Log:
add an '-httpd_conf_extra <filename>' 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) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic