You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Steve Hay <st...@uk.radan.com> on 2003/09/17 18:40:50 UTC
[mp2] LWP seems to be required for some tests
Hi,
Earlier today I reported test failures in filter/in_str_consume,
apache/cookie, apache/cookie2 and apr/perlio.
Geoff has kindly come up with a solution for the two cookie test script
failures, but I've inadvertently found another way to "fix" them, and
also the filter/in_str_consume test: simply install LWP (and it's
pre-requisites: HTML-Tagset, HTML-Parser and URI)!
This seems to be quite reproduceable:
- with perl + libwin32 those three test scripts fail;
- with perl + libwin32 + LWP (etc) those three pass (even without
Geoff's patch).
It looks like Geoff's patch is right and should be applied anyway, but
is there a requirement of LWP for mp2? I know there is with mp1 --
Makefile.PL complains if you haven't got it, but there was no such
complaint from mp2's Makefile.PL so I didn't initially have it.
Interestingly, the error message from mp1's Makefile.PL if you haven't
got LWP is this:-
"The libwww-perl library is needed to run the test suite.
Installation of this library is recommended, but not required."
Looks like the same check should still be made in mp2 to me!
It doesn't "fix" the apr/perlio test, though :-(
- Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] LWP seems to be required for some tests
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>> Unrelated we need to test the test suite with LWP not available,
>
>
> indeed
>
>> I'd even suggest a new command line option -nolwp which will make sure
>> that it's not loaded and the test suite is running without it. That
>> will make it easy to test. Sounds goood?
>>
>
> yup
OK, committed code that allows us to run 'make test' pretending that LWP is
not there.
Modified: perl-framework/Apache-Test/lib/Apache TestRequest.pm
if env var APACHE_TEST_PRETEND_NO_LWP is true, Apache::Test will
pretend that LWP is not available. useful for testing whether the test
suite will survive on a system which doesn't have libwww-perl
installed.
Now I can see the bugs reported by Steve. will fix them shortly.
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] LWP seems to be required for some tests
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Unrelated we need to test the test suite with LWP not available,
indeed
> I'd
> even suggest a new command line option -nolwp which will make sure that
> it's not loaded and the test suite is running without it. That will make
> it easy to test. Sounds goood?
>
yup
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] LWP seems to be required for some tests
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>
> Steve Hay wrote:
>
>> Hi,
>>
>> Earlier today I reported test failures in filter/in_str_consume,
>> apache/cookie, apache/cookie2 and apr/perlio.
>>
>> Geoff has kindly come up with a solution for the two cookie test
>> script failures, but I've inadvertently found another way to "fix"
>> them, and also the filter/in_str_consume test: simply install LWP (and
>> it's pre-requisites: HTML-Tagset, HTML-Parser and URI)!
>
>
> ah. that explains it. I was wondering why the GET was working for me
> _without_ the leading /, which is always required per the RFC. I guess
> LWP adds it behind the scenes.
>
> at any rate, Apache::Test has a base implementation that creates GET and
> other methods when LWP is not found. it also exports have_lwp() so
> testers can rely on other aspects of LWP in their tests.
Steve, LWP is not required to run most of the tests, since Doug wrote an
internal simple replacement for LWP which kicks-in when LWP is not available.
it doesn't have all the features that LWP has, but good enough for most of the
tests. So when we find a test that fails because LWP is not available we
should either make its run optional or see if it's simple enough to fix the
Apache::TestRequest client to do the work.
Unrelated we need to test the test suite with LWP not available, I'd even
suggest a new command line option -nolwp which will make sure that it's not
loaded and the test suite is running without it. That will make it easy to
test. Sounds goood?
> so, I guess we need to fix all the places where location does not have
> an initial slash. additionally, we should consider whether to make GET
> and the other methods prepend an initial / to the uri when LWP is not
> present.
This is certainly a bug. If you find any others they should be fixed.
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] LWP seems to be required for some tests
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Steve Hay wrote:
> Hi,
>
> Earlier today I reported test failures in filter/in_str_consume,
> apache/cookie, apache/cookie2 and apr/perlio.
>
> Geoff has kindly come up with a solution for the two cookie test script
> failures, but I've inadvertently found another way to "fix" them, and
> also the filter/in_str_consume test: simply install LWP (and it's
> pre-requisites: HTML-Tagset, HTML-Parser and URI)!
ah. that explains it. I was wondering why the GET was working for me
_without_ the leading /, which is always required per the RFC. I guess LWP
adds it behind the scenes.
at any rate, Apache::Test has a base implementation that creates GET and
other methods when LWP is not found. it also exports have_lwp() so testers
can rely on other aspects of LWP in their tests.
so, I guess we need to fix all the places where location does not have an
initial slash. additionally, we should consider whether to make GET and the
other methods prepend an initial / to the uri when LWP is not present.
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org