Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 40092 invoked by uid 500); 9 Jul 2003 05:38:55 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 40080 invoked from network); 9 Jul 2003 05:38:55 -0000 Message-ID: <3F0CE63B.3090808@stason.org> Date: Wed, 09 Jul 2003 21:06:19 -0700 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: test-dev@httpd.apache.org Cc: Ken Williams Subject: Re: Perl Testing References: <3ACC50F3-A259-11D7-BDB2-0003931A964A@kineticode.com> In-Reply-To: <3ACC50F3-A259-11D7-BDB2-0003931A964A@kineticode.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N David Wheeler wrote: > On Thursday, June 19, 2003, at 09:13 AM, Geoffrey Young wrote: > >> I think he means by adding your own ServerRoot directive to >> extra.last.conf.in. however, I see what you are saying and that won't >> likely resolve your issue. > > > Yes, and I can't know what it is ahead of time. I don't expect that this > would work: > > ServerRoot @ServerRoot@/.. either at run-time: t/TEST -serverroot /my/server/root or in your t/TEST script: $Apache::TestConfig::Argv{serverroot} = "/my/server/root"; or in your Makefile.PL: push @ARGV, qw(-serverroot /my/server/root); Apache::TestMM::filter_args(); Apache::TestMM::generate_script(t/TEST); I haven't tested that, but it should work just like all other overrides, no? t/TEST --help shows all the available options >> is there some reason that you want to backtrack to t/ in your test >> scripts? for the most part, I put things I need under t/, including >> libraries and other cruft, so that everything is relative to the >> default ServerRoot setting. > > > I _do_ want t to be the ServerRoot. But I _don't_ want t/ to be cwd for > all of the tests that run (t/*.t). cwd during `make test` should be the > package root directory. For example, I have a test script, t/01basic.t, > that opens the error log to look for error messages from the Apache test > server. Under Apache::test (and any other CPAN test suite that runs via > Perl's usual `make test`), I would have to open it like this: > > open ERR, 't/logs/error_log' or die "Can't do it: $!\n"; > > However, under the default `make test` with Apache::Test, it changes the > cwd to t. This is not where CPAN modules should be tested from. It > forces me to open the error log like this, instead: > > open ERR, 'logs/error_log' or die "Can't do it: $!\n"; > > That's what I think should be changed. > > Hope I've explained it better this time! :-) don't rely on cwd, use the full path: my $vars = Apache::Test::vars(); my $path = catfile $vars->{serverroot}, qw(logs error_log); Does that solve your problem? __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com