Adding more options to Makefile.PL for testing

Adding more options to Makefile.PL for testing

am 29.01.2003 23:47:45 von Jay Lawrence

I am running across some limitations in the current tests. In my case I
have relocated my socket and options files so that I can have more than
one independent instance of MySQL running.

Therefore I started to upgrade the Makefile.PL to allow for
--testsocket
--testdefaults
--testgroup

I am running against the need to modify more of the tests to allow
tests like, say, akmisc.t to run properly. (It assumes just a simple
host to connect with).

Would this be a welcome contribution? If so I will roll up my sleeves
and send in a patch that will address the above three options for:
Makefile.PL; t/akmisc.t; t/dbdadmin.t; mysql.t; and mysql2.t

Regards,
Jay


------------------------------------------------------------ ---------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail msql-mysql-modules-thread2012@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail msql-mysql-modules-unsubscribe@lists.mysql.com instead.

Re: Adding more options to Makefile.PL for testing

am 30.01.2003 10:19:51 von Jochen Wiedmann

Zitiere Jay Lawrence :

> I am running across some limitations in the current tests. In my case I
> have relocated my socket and options files so that I can have more than
> one independent instance of MySQL running.

> Therefore I started to upgrade the Makefile.PL to allow for
> --testsocket
> --testdefaults
> --testgroup

Please, don't. I do not know, whether this is currently
present. If not, add the option

--testdsn

All of the above can be specified as part of the DSN.


> I am running against the need to modify more of the tests to allow
> tests like, say, akmisc.t to run properly. (It assumes just a simple
> host to connect with).

This is indeed the single reason why "testhost" and "testport" are
used: Downwards compatibility to the "Mysql" module.


I would suggest the following:

- Add a new option --testdsn with the following rules: If
--testdsn is specified, then --testhost, --testport and
--testdb are ignored. Even more, if they are specified,
then a warning should be issued, that these options are
deprecated and being removed a future version.

- Update the test scripts for DBD::mysql to use this option.

- Change the Mysql module to allow specifying a DSN rather
than host, port and database. For example, I would suggest
to verify whether the "host" string starts with "DBI:mysql"
(not with DBI:mysql:, so that a driver like "DBI:mysqlEmbed"
works in the future!). If so, take the "host" value as a
DSN and the following values as user and password, as in

Mysql->connect("DBI:mysql:mydb", "joe", "joespassword");

(Do not forget to update the "Mysql" docs appropriately!)

Update the Mysql tests to make use of that feature.


If you do all of the above, I'd be *quite* happy to accept a
patch.


Regards,

Jochen

------------------------------------------------------------ ---------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail msql-mysql-modules-thread2013@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail msql-mysql-modules-unsubscribe@lists.mysql.com instead.

Re: Adding more options to Makefile.PL for testing

am 30.01.2003 10:19:51 von Jochen Wiedmann

Zitiere Jay Lawrence :

> I am running across some limitations in the current tests. In my case I
> have relocated my socket and options files so that I can have more than
> one independent instance of MySQL running.

> Therefore I started to upgrade the Makefile.PL to allow for
> --testsocket
> --testdefaults
> --testgroup

Please, don't. I do not know, whether this is currently
present. If not, add the option

--testdsn

All of the above can be specified as part of the DSN.


> I am running against the need to modify more of the tests to allow
> tests like, say, akmisc.t to run properly. (It assumes just a simple
> host to connect with).

This is indeed the single reason why "testhost" and "testport" are
used: Downwards compatibility to the "Mysql" module.


I would suggest the following:

- Add a new option --testdsn with the following rules: If
--testdsn is specified, then --testhost, --testport and
--testdb are ignored. Even more, if they are specified,
then a warning should be issued, that these options are
deprecated and being removed a future version.

- Update the test scripts for DBD::mysql to use this option.

- Change the Mysql module to allow specifying a DSN rather
than host, port and database. For example, I would suggest
to verify whether the "host" string starts with "DBI:mysql"
(not with DBI:mysql:, so that a driver like "DBI:mysqlEmbed"
works in the future!). If so, take the "host" value as a
DSN and the following values as user and password, as in

Mysql->connect("DBI:mysql:mydb", "joe", "joespassword");

(Do not forget to update the "Mysql" docs appropriately!)

Update the Mysql tests to make use of that feature.


If you do all of the above, I'd be *quite* happy to accept a
patch.


Regards,

Jochen

------------------------------------------------------------ ---------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail msql-mysql-modules-thread2013@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail msql-mysql-modules-unsubscribe@lists.mysql.com instead.