David Golden wrote:
On 11/13/06, David Precious <[EMAIL PROTECTED]> wrote:
Do you think the test scripts should auto-skip the tests if it fails to
connect to MySQL with a permission denied error?
This would be the best approach. Tests that cannot be run due to the
user's configuration should be skipped -- perhaps with a warning that
the test could not be run and an explanation.
Regards,
David Golden
Hi,
With any other software package, I might agree. But we are talking a
database connector. The primise of the entire test is that it connects
to the db. If it can't, then there's no way to know if the driver is any
good and functioning properly. The 'make test' phase is the stop-gap
that prevents DBD::mysql from being installed automatically when using
CPAN. If the driver has some sort of error, either in the compilation,
link, et al, and the test skips most of the tests, a user could
potentially end up having the driver installed when it is in fact broken.
The error you showed before was not a db connection permission. It was
that the db itself wasn't able to write to it's datadir (.frm files...).
I think the best solution is to fix the database to work, both with the
driver, and be able to create tables. If this is an automated test
setup, then the password to the db will be the same. Just set up the
automation to build DBD::mysql with the testuser as a user who can
connect and create tables. See the options of "perl Makefile.PL"
particularly "--testuser", "--testpassword".
Kind regards,
Patrick