FAQ
Absolutely.

+1
On 08/19/10 17:54, Torsten Förtsch wrote:
Hi,

I'm getting '[ error] Failed to find a config file to save the custom
configuration in' during one of my tests.

The code (spec file) looks like:

=================================================================
export APACHE_TEST_NO_STICKY_PREFERENCES=1
%perl Makefile.PL -apxs=%{apxs}
make %{?jobs:-j%jobs} &&
t/TEST -apxs %{apxs} -httpd_conf %{sysconfdir}/original/httpd-modperl.conf
=================================================================

So, APACHE_TEST_NO_STICKY_PREFERENCES is set and it shouldn't reach at all the
place where the error is printed. The test uses Apache::Test in a <perl>
section in extra.last.conf.in:

=================================================================
<Perl>
use Util::Search;
use Apache::Test;
use Apache::TestUtil qw/t_catfile/;

$My::Search=Util::Search-
new(config=>Apache::Test::vars(qw/t_dir/).'/config');
...
=================================================================

I believe the APACHE_TEST_NO_STICKY_PREFERENCES is not propagated to the
Apache environment. And hence is tries to save the custom config. Does that
sound reasonable?

If yes, I think the place to fix it is in
Apache-Test/lib/Apache/TestConfigPerl.pm:

=================================================================
# propogate PerlPassEnv settings to the server
sub configure_env {
my $self = shift;
$self->preamble(IfModule => 'mod_perl.c',
[ qw(PerlPassEnv APACHE_TEST_TRACE_LEVEL
PerlPassEnv HARNESS_PERL_SWITCHES)
]);
}
=================================================================

Shouldn't APACHE_TEST_NO_STICKY_PREFERENCES be added to this list?

Torsten Förtsch

- --
- ------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Apache Infrastructure; Member, Apache Software Foundation
Committer, FreeBSD Foundation
Consultant, P6M7G8 Inc.
Sr. System Admin, Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupdev @
categoriesmodperl, perl
postedAug 19, '10 at 5:55p
activeAug 20, '10 at 4:23p
posts2
users2
websiteperl.apache.org

People

Translate

site design / logo © 2019 Grokbase