httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wheeler <da...@kineticode.com>
Subject Perl Testing
Date Tue, 17 Jun 2003 15:51:24 GMT
Hi All,

I'm porting MasonX::CallbackHandler from Apache::test to Apache::Test. 
My Makefile.PL does this:

use Apache::TestMM qw(test clean);
use Apache::TestRunPerl;

Apache::TestMM::filter_args();
Apache::TestRunPerl->generate_script();

This is nice, because it creates t/TEST for me. But I've noticed a 
couple of issues that might be relevant to other folks porting from 
Apache::test:

1. The documentation is pretty lacking. Granted, it was bad in 
Apache::test, too, but I sure would like to see some decent pod in each 
of the important Apache::Test* modules.

2. The tests are being run from t/, rather then from the root of the 
module distribution directory. IIRC, Perl itself runs all of its tests 
from t/, but all modules by default run them from the module 
distribution root. Can this be fixed/changed?

3. Those of us porting from Apache::test typically have a special 
configuration file (now nicely able to be t/lib/extra.conf.in -- 
thanks!) and loads up the libraries we want to test. However, Apache 
isn't being started during `make test` with C<use blib>. Now, since 
tests run from t, even it it did C<use blib>, it wouldn't work. So I 
had to add this code to my extra.conf.in:

<Perl>
   use File::Spec::Functions qw(catdir);
   use lib catdir '@ServerRoot@', '..', 'blib';
   use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>

Could this, too, be fixed? Perhaps just for Perl modules?

TIA for your help/answers/corrections to my observations.

Regards,

David

-- 
David Wheeler                                     AIM: dwTheory
david@kineticode.com                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e
                                                Jabber: Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]


Mime
View raw message