Joe Orton wrote:
On Wed, Aug 11, 2004 at 01:17:04AM -0700, Stas Bekman wrote:
I'd rather see it moved two statements (it still works, doesn't it?) so the eapi comes right after inherit_config. Otherwise, yes, please commit it.
Yes, great, done.
so are we all clean now? Any other problems?
No failures with HEAD again now - thanks a lot.
since I don't have ssl compiled in I still have one issue:
t/TEST -clean Use of uninitialized value in hash element at /src/httpd-test-pristine/perl-framework/Apache-Test/lib/Apache/TestConfig.pm line 1340.
Hmm, but httpd_config() calls clean() on its own. So if you didn't supply httpd/apxs, you will get into an endless loop.
sub httpd_config { my $self = shift;
my $vars = $self->{vars};
$self->configure_apxs; $self->configure_httpd;
unless ($vars->{httpd} or $vars->{apxs}) { if ($ENV{APACHE_TEST_NO_STICKY_PREFERENCES}) { error "You specified APACHE_TEST_NO_STICKY_PREFERENCES=1 " . "in which case you must explicitly specify -httpd " . "and/or -apxs options"; Apache::TestRun::exit_perl(0); }
$self->clean(1); ...
so the only way to do what you want (which makes sense) is to call $self->httpd_config() only if ($vars->{httpd} or $vars->{apxs})
or may be it's possible to drop that clean(1) call in the above code and if so, you the better way to handle that is to adjust TestRun.pm's
@exit_opts_need_httpd, making -conf requiring httpd config.
But things are getting more and more fragile and dependant on each other, making the code less and less maintainable. We need to rethink how the things are configured in A-T, write some sort of test suite to cover what's working, then completely rewrite the configuration process from scratch, making sure that things are still working.
the attached patch fixes it and explains what the issue is.
One more thing I'm not happy about is the name I've chosen: $self->httpd_config. Any better name ideas, such so it clearly indicates that httpd is found and the config object is configured with it?
? ssl.patch
Index: lib/Apache/TestConfig.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.236
diff -u -r1.236 TestConfig.pm
--- lib/Apache/TestConfig.pm 11 Aug 2004 08:42:36 -0000 1.236
+++ lib/Apache/TestConfig.pm 11 Aug 2004 12:44:57 -0000
@@ -1013,6 +1013,12 @@
my $self = shift;
$self->{clean_level} = shift || 2; #2 == really clean, 1 == reconfigure
+ # we can't clean the server until it is fully configured
+ # for instance, at this point we haven't called default_module yet,
+ # which means that we don't know which ssl module we're even looking
+ # for in sslca_clean/sslca_can
+ $self->httpd_config;
+
$self->new_test_server->clean;
$self->cmodules_clean;
$self->sslca_clean;
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com