You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2004/02/19 05:16:57 UTC
cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
stas 2004/02/18 20:16:57
Modified: perl-framework/Apache-Test Changes
perl-framework/Apache-Test/lib/Apache TestConfig.pm
Log:
If at least one *conf*.in files is modified since the last
configuration, make sure to regenerate them all, so the right ports
will be assigned.
Revision Changes Path
1.91 +4 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -u -r1.90 -r1.91
--- Changes 18 Feb 2004 20:24:44 -0000 1.90
+++ Changes 19 Feb 2004 04:16:57 -0000 1.91
@@ -8,6 +8,10 @@
=item 1.08_dev
+If at least one *conf*.in files is modified since the last
+configuration, make sure to regenerate them all, so the right ports
+will be assigned. [Stas]
+
Make sure that Apache-Test modules are installed into INSTALLSITEARCH
during a standalone build. Because EU::MM does so when A-T is bundled
with mp2, and we want to avoid having A-T installed in two different
1.206 +22 -12 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.205
retrieving revision 1.206
diff -u -u -r1.205 -r1.206
--- TestConfig.pm 18 Feb 2004 00:30:57 -0000 1.205
+++ TestConfig.pm 19 Feb 2004 04:16:57 -0000 1.206
@@ -1166,27 +1166,37 @@
}
}
+ my $regenerate = 0;
for my $file (@conf_files) {
- local $Apache::TestConfig::File = $file;
-
(my $generated = $file) =~ s/\.in$//;
push @extra_conf, $generated;
- debug "Including $generated config file";
+ $regenerate++ unless -e $generated && -M $generated < -M $file;
+
+ debug "Will 'Include' $generated config file";
+ }
+
+ # if at least one .in file was generated, regenerate them all (so
+ # information like assigned port numbers will be correct)
+ if ($regenerate) {
+ # forget the vhosts cache, since a different port could be assigned
+ $self->{vhosts} = {};
- next if -e $generated
- && -M $generated < -M $file;
+ for my $file (@conf_files) {
+ local $Apache::TestConfig::File = $file;
- my $in = Symbol::gensym();
- open($in, $file) or next;
+ my $in = Symbol::gensym();
+ open($in, $file) or next;
- my $out = $self->genfile($generated, $file);
- $self->replace_vars($in, $out);
+ (my $generated = $file) =~ s/\.in$//;
+ my $out = $self->genfile($generated, $file);
+ $self->replace_vars($in, $out);
- close $in;
- close $out;
+ close $in;
+ close $out;
- $self->check_vars;
+ $self->check_vars;
+ }
}
#we changed order to give ssl the first port after DEFAULT_PORT