Re: TestConfig->new deletes vhosts (et al)
On Wed, 5 Sep 2001, Gary Benson wrote: > But looking more closely, I see that there is a -port option. Perhaps > that makes more sense... you can also run: % perl Makefile.PL apxs ~/apache-2.0/bin/apxs port then the generated t/TEST will uses these values in such a way that does not invalidate the config cache.
Re: TestConfig->new deletes vhosts (et al)
On Wed, 5 Sep 2001, Doug MacEachern wrote: > On Mon, 3 Sep 2001, Gary Benson wrote: > > > > > Hi all, > > > > I'm getting problems with tests passing if I run: > > > > % perl t/TEST > > > > but failing if I run: > > > > % perl t/TEST -start-httpd > > % perl t/TEST -run-tests > > % perl t/TEST -stop-httpd > > works fine for me. > > > It seems that this chunk of code, from TestConfig.pm (~ line 140), is the > > culprit. It deletes the section of the config file that contains the > > virtual host stuff, which breaks the tests which need them. > > > > #regenerating config, so forget old > > if ($args->{save}) { > > for (qw(vhosts inherit_config modules inc)) { > > delete $thaw->{$_} if exists $thaw->{$_}; > > } > > } > > > > Does anyone know _why_ it deletes the vhosts stuff -- is it required by > > something else, or was it once required but not any more? > > that should only happen when configuration is being generated, in which > case the vhosts will be rediscovered. things like apxs are canidates for > reuse from the old config. otherwise, cached config is used and that bit > is not run. i wonder if you have something in your shell env that is > triggering reconfiguration, such as: > my %passenv = map { $_,1 } qw{ > APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT > }; APACHE_PORT is set. Should I explicitly set APACHE_PORT _only_ for t/TEST -start-httpd? Eg: % APACHE_PORT=whatever t/TEST -start-httpd % perl t/TEST -run-tests % perl t/TEST -stop-httpd But looking more closely, I see that there is a -port option. Perhaps that makes more sense... Okay, thanks for that, Gary [ Gary Benson, Red Hat Europe ][ [EMAIL PROTECTED] ][ GnuPG 60E8793A ]
Re: TestConfig->new deletes vhosts (et al)
On Mon, 3 Sep 2001, Gary Benson wrote: > > Hi all, > > I'm getting problems with tests passing if I run: > > % perl t/TEST > > but failing if I run: > > % perl t/TEST -start-httpd > % perl t/TEST -run-tests > % perl t/TEST -stop-httpd works fine for me. > It seems that this chunk of code, from TestConfig.pm (~ line 140), is the > culprit. It deletes the section of the config file that contains the > virtual host stuff, which breaks the tests which need them. > > #regenerating config, so forget old > if ($args->{save}) { > for (qw(vhosts inherit_config modules inc)) { > delete $thaw->{$_} if exists $thaw->{$_}; > } > } > > Does anyone know _why_ it deletes the vhosts stuff -- is it required by > something else, or was it once required but not any more? that should only happen when configuration is being generated, in which case the vhosts will be rediscovered. things like apxs are canidates for reuse from the old config. otherwise, cached config is used and that bit is not run. i wonder if you have something in your shell env that is triggering reconfiguration, such as: my %passenv = map { $_,1 } qw{ APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT };
TestConfig->new deletes vhosts (et al)
Hi all, I'm getting problems with tests passing if I run: % perl t/TEST but failing if I run: % perl t/TEST -start-httpd % perl t/TEST -run-tests % perl t/TEST -stop-httpd It seems that this chunk of code, from TestConfig.pm (~ line 140), is the culprit. It deletes the section of the config file that contains the virtual host stuff, which breaks the tests which need them. #regenerating config, so forget old if ($args->{save}) { for (qw(vhosts inherit_config modules inc)) { delete $thaw->{$_} if exists $thaw->{$_}; } } Does anyone know _why_ it deletes the vhosts stuff -- is it required by something else, or was it once required but not any more? Cheers, Gary [ Gary Benson, Red Hat Europe ][ [EMAIL PROTECTED] ][ GnuPG 60E8793A ]