httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wheeler <da...@kineticode.com>
Subject Re: Makefile.PL Questions
Date Mon, 30 Jun 2003 19:11:40 GMT
On Monday, June 30, 2003, at 11:26  AM, Geoffrey Young wrote:

> this makes 'make test' echo the error string or run the tests, 
> depending on whether A::T is installed.  in either case, 'make test' 
> is successful (I hope :)

Looks like it would be. I decided to use a different approach. Since 
some of the tests in my test suite don't require Apache::Test, I simply 
added this code to those that do require it:

BEGIN{
     if (eval {require Apache::Test}) {
         Apache::Test->import(qw(have_lwp plan));
         require Apache::TestRequest;
         Apache::TestRequest->import(qw(GET POST));
         plan tests => 43, have_lwp;
     } else {
         plan skip_all => 'Apache::Test required to run tests.';
     }
}

So the test suite still runs in Test::Harness, but all the tests are 
skipped.

Hope this can help others.

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