X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fglobal_destruction.t;h=8b22c8d5ce410f5a2bc787ac5f27db7f30f096db;hb=7e1ca6dd06c5e53e7afa3433da0f59e41ce791e8;hp=ae4260ae7847359f075e5d1398ff49a1f369a64f;hpb=66441708b7337cde35fa7f618e23df0c155cd741;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/global_destruction.t b/t/storage/global_destruction.t index ae4260a..8b22c8d 100644 --- a/t/storage/global_destruction.t +++ b/t/storage/global_destruction.t @@ -9,13 +9,20 @@ use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; -plan skip_all => 'Test segfaults on Win32' if $^O eq 'MSWin32'; +plan skip_all => 'Test segfaults on Win32 - investigation pending' + if $^O eq 'MSWin32' && DBICTest::RunMode->is_plain; -for my $type (qw/PG MYSQL/) { +for my $type (qw/PG MYSQL SQLite/) { SKIP: { - skip "Skipping $type tests without DBICTEST_${type}_DSN", 1 - unless $ENV{"DBICTEST_${type}_DSN"}; + my @dsn = $type eq 'SQLite' + ? DBICTest->_database(sqlite_use_file => 1) + : do { + skip "Skipping $type tests without DBICTEST_${type}_DSN", 1 + unless $ENV{"DBICTEST_${type}_DSN"}; + @ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/} + } + ; if ($type eq 'PG') { skip "skipping Pg tests without dependencies installed", 1 @@ -26,7 +33,7 @@ for my $type (qw/PG MYSQL/) { unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mysql'); } - my $schema = DBICTest::Schema->connect (@ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/}); + my $schema = DBICTest::Schema->connect (@dsn); # emulate a singleton-factory, just cache the object *somewhere in a different package* # to induce out-of-order destruction