Patrick Galbraith wrote:
Hi all,
I get emails from the cpan automated testing that list failures, but the
failures are not the driver two main things:
1. Can't find mysql_config. This script prints out the compile options,
paths, etc
2. During make test, can't connect because I don't set a password or
user name unless "perl Makefile.PL --testuser=<user>" is specified. I
could just use "root" and a blank password and have it work for more
installations, but I still I can't assume any particular
username/password is going to work. "root" could be set with a
particular password as well.
So, I'm wondering how other driver maintainers deal with these types of
issues. Surely there are parallels to the types of issues I have with
MySQL.
Thanks much!
Patrick
Patrick,
I had quite a long thread of discussion on cpan-testers about similar
problems with DBD::ODBC. As a result I added some pod to DBI::DBD (might
only be in subversion as I can't remember if there has been a DBI
release since).
As Jonathan says, if you do not generate a Makefile, you do not fail the
tests and you get a NA instead which does not generate an email. If you
cannot find mysql_config exit successfully, without creating Makefile.PL.
Being unable to connect during a test is trickier. You could:
o insist on a username and password for the tests and not generate a
Makefile if there wasn't one. It may still fail if the username or
password are wrong but in my experience cpan-testers are not going to
set one anyway.
o try a connect outside with some tool that comes with mysql - the mysql
or mysqladmin binaries perhaps, if they exist. If they fail to connect
do not generate a Makefile. DBD::Oracle tries to use sqlplus to find the
version of Oracle and this action tests the username/password. DBD::ODBC
could use isql (that comes with unixODBC) or iodbctest (that comes with
iodbc) although it does not at present partly because iodbctest solicits
user input.
All my successful tests for 1.15_2
(http://cpantesters.perl.org/show/DBD-ODBC.html#DBD-ODBC-1.15_2) were
successful because all tests after the first one were skipped due to the
cpan-tester not having defined a DSN to use. This provides less than 1%
coverage of the code but it does test the Makefile.PL works.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com