stas 2004/02/25 13:33:46
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
perl-framework/Apache-Test Changes
Log:
fix the custom config use for Apache-Test's own upgrades. the problem was
created when custom_config_load was moved into run() and wasn't always
loaded as before. Now try to load it from custom_config_exists to compile
with the spec.
Revision Changes Path
1.153 +9 -2
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
Index: TestRun.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -u -r1.152 -r1.153
--- TestRun.pm 19 Feb 2004 19:52:52 -0000 1.152
+++ TestRun.pm 25 Feb 2004 21:33:45 -0000 1.153
@@ -1239,8 +1239,11 @@
}
sub custom_config_exists {
- # custom config gets loaded via custom_config_load when this
- # package is loaded. it's enough to check whether we have a custom
+ # try to load custom config if it wasn't loaded yet (there are
+ # many entry points to this API)
+ custom_config_load();
+
+ # it's enough to check whether we have a custom
# config for 'httpd' or 'apxs'.
my $httpd = $Apache::TestConfigData::vars->{httpd} || '';
return 1 if $httpd && -e $httpd && -x _;
@@ -1430,11 +1433,15 @@
close $fh;
}
+my $custom_config_loaded = 0;
sub custom_config_load {
debug "trying to load custom config data";
+ return if $custom_config_loaded;
+
if (my $custom_config_path = custom_config_path()) {
debug "loading custom config path '$custom_config_path'";
+ $custom_config_loaded++;
require $custom_config_path;
}
}
1.97 +1 -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.96
retrieving revision 1.97
diff -u -u -r1.96 -r1.97
--- Changes 25 Feb 2004 02:33:14 -0000 1.96
+++ Changes 25 Feb 2004 21:33:45 -0000 1.97
@@ -8,6 +8,7 @@
=item 1.09-dev
+fix the custom config use for Apache-Test's own upgrades [Stas]
=item 1.08 - February 24, 2004