DBIx-SB tests on other DBs

Hello.
Ok, here is what I’ve done to allow us run SB tests on mysql, postgres
and other DBs.

All comments are wellcome, but some are required.
For now I didn’t finish several things:

  1. connect_* functions in utils.pl.
    This functions should connect handle to test DBs of your RDBMS. I wrote
    only simple ‘connect_mysql’ that connects to DB ‘test’ with user ‘root’
    and empty password. I use it for local testings, but for CPAN we should
    use configurable connect_* functions. Because configuration should be
    asked or entered once across all tests, I think we should use ENV
    variables or write config options into t/ dir. Please, suggest prefered
    way and if you choose ENV then suggest generic naming.

  2. I wrote mysql schemas for current test suite, please, wrote schemas
    for other DBs and send them back with report about test suite success or
    fails.

Wait for your comments. Best regards, Ruslan.

Ahh, forgot attachment :slight_smile:

Ruslan U. Zakirov wrote:

step2_to_cross_DB_tests.patch (15.2 KB)

Heya, guys.
Attach new patch that uses ENV vars to define DB connect options, for
example if you want run mysql tests then you can use:

SB_TEST_MYSQL=“test” SB_MYSQL_USER=“root” SB_MYSQL_PASS=“” make test

I expect it would be merged before 1.30 because:

  1. it has no functionality changes;
  2. mysql tests are disabled by default;
  3. I’m waiting for some feedback.

Regadrds. Ruslan.

Ruslan U. Zakirov wrote:

step2_to_cross_DB_tests.patch (17 KB)

I expect it would be merged before 1.30 because:

  1. it has no functionality changes;
  2. mysql tests are disabled by default;
  3. I’m waiting for some feedback.

Looks quite neat. How are you generating this patch? I can’t apply it
cleanly here.

Jesse Vincent wrote:

I expect it would be merged before 1.30 because:

  1. it has no functionality changes;
  2. mysql tests are disabled by default;
  3. I’m waiting for some feedback.

Looks quite neat. How are you generating this patch? I can’t apply it
cleanly here.

Sorry, didn’t test how it applies to trunk :frowning: changes were partly
applied to local branch so patch was not consistent.

Regards, Ruslan.

P.S. There is also change in SearchBuilder/Handle.pm in the patch that
is look like cosmetic, but I was forced by “strange” warning. You can
see it if don’t apply this particular change.

step2_to_cross_DB_tests.patch (14.2 KB)

Heya.
Here is new variant and I think it’s ready for mainline.
New feature is cleanup_schema function in utils.pl that is needed for
InterBase.pm tests and may be for other DBs.

Applies cleanly on trunk.

Best regards, Ruslan.

Ruslan U. Zakirov wrote:

cross_DB_tests.patch (22.7 KB)

Heya.
Here is new variant and I think it’s ready for mainline.
New feature is cleanup_schema function in utils.pl that is needed for
InterBase.pm tests and may be for other DBs.

Thanks! Applied.