Subject: | Suggestions on improving likely hood of tests passing |
When installing libwww on a fresh Mac OS X 10.4 install I had several test issues to deal with
and I'll go over how I corrected them here so that
The first failing test following test will fail:
t/02-payload...........ok 27/125Could not load UserAgent class LWP::UserAgent
It would be nice if HTML::Tagset where either a prereq or the test was skipped if the module
was not installed.
The next set of failures follow:
t/03-server............NOK 2/32# Failed test 2 in t/03-server.t at line 174
# t/03-server.t line 174 is: skip(($_ =~ /XML/ || !$is_mimetools_installed),
t/03-server............NOK 3/32# Failed test 3 in t/03-server.t at line 174 fail #2
t/03-server............NOK 4/32# Failed test 4 in t/03-server.t at line 174 fail #3
t/03-server............NOK 7/32# Failed test 7 in t/03-server.t at line 182
# t/03-server.t line 182 is: skip(($_ =~ /XML/ || !$is_mimetools_installed),
t/03-server............NOK 8/32# Failed test 8 in t/03-server.t at line 182 fail #2
t/03-server............NOK 9/32# Failed test 9 in t/03-server.t at line 182 fail #3
t/03-server............FAILED tests 2-4, 7-9
Failed 6/32 tests, 81.25% okay (less 2 skipped tests: 24 okay, 75.00%)
t/04-attach............Something wrong with MIME message: MIME::Parser: can't flush: at /
System/Library/Perl/Extras/5.8.6/MIME/Parser.pm line 789.
t/04-attach............dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-15
Failed 15/15 tests, 0.00% okay
I did some searching and found this post regarding test failures with SOAP::Lite:
http://use.perl.org/~gabor/journal/22370
This is the comment that was able to help me:
http://use.perl.org/comments.pl?sid=24143&cid=48950
Before upgrading to IO::ScalarArray I was at version 1.1.1.1 and am now at 2.110
which brought the given test to pass:
t/03-server............ok
2/32 skipped: various reasons
t/04-attach............ok
Is it a good idea to make a newer version IO::ScalarArray a prereq? This is an issue with the
tests? I'm not going to claim to know and move on to the last failing test:
t/06-modules...........NOK 15/19# Failed test 15 in t/06-modules.t at line 24 fail #14
# t/06-modules.t line 24 is: $@ =~ /(Can\'t locate)|(XML::Parser::Lite requires)|(this is only
version)|(load mod_perl)/
t/06-modules...........NOK 19/19# Failed test 19 in t/06-modules.t at line 24 fail #16
t/06-modules...........FAILED tests 15, 19
Failed 2/19 tests, 89.47% okay (less 3 skipped tests: 14 okay, 73.68%)
This is the point at which Andy Lester says it is ok to let the tests not pass as he recently
wrote in a "HOWTO: Install SOAP::Lite" articale for socialtext:
http://www.socialtext.net/stoss/index.cgi?howto_install_soap_lite
Personally I don't think test should ever fail, especially ones that are distributed with modules
on CPAN so I dug into it a bit more. I found that there is a list of exceptions that are allowed
to pass and of course the one I had that was causing the tests to fail was not in the list. Here
are the modules that had un-handled exceptions along with the exception:
Apache::XMLRPC::Lite - Undefined subroutine &Apache::Constants::OK called at ../lib/SOAP/
Transport/HTTP.pm line 565.
Apache::SOAP - Undefined subroutine &Apache::Constants::OK called at ../lib/SOAP/
Transport/HTTP.pm line 565.
I'm pretty sure that this exception should be handled and adding it to the list of handled
exceptions on my box allowed me to pass with passing tests.
Hopefully may account of getting tests passing will help someone to get the tests in shape so
that they pass without having to go through all of the above.