Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / storage / quote_names.t
index a4bcefa..08fcd00 100644 (file)
@@ -1,9 +1,11 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 use Test::More;
 use Data::Dumper::Concise;
 use Try::Tiny;
-use lib qw(t/lib);
+
 use DBICTest;
 
 my %expected = (
@@ -89,7 +91,9 @@ my %dbs = (
 );
 
 # lie that we already locked stuff - the tests below do not touch anything
-$ENV{DBICTEST_LOCK_HOLDER} = -1;
+# unless we are under travis, where the OOM killers reign and things are rough
+$ENV{DBICTEST_LOCK_HOLDER} = -1
+  unless DBICTest::RunMode->is_ci;
 
 # Make sure oracle is tried last - some clients (e.g. 10.2) have symbol
 # clashes with libssl, and will segfault everything coming after them
@@ -128,8 +132,12 @@ for my $db (sort {
     "$db name_sep with quote_names => 1 is $name_sep_text";
 
   # if something was produced - it better be quoted
-  if ( my $ddl = try { $schema->deployment_statements } ) {
-
+  if (
+    # the SQLT producer has no idea what quotes are :/
+    ! grep { $db eq $_ } qw( SYBASE DB2 )
+      and
+    my $ddl = try { $schema->deployment_statements }
+  ) {
     my $quoted_artist = $sql_maker->_quote('artist');
 
     like ($ddl, qr/^CREATE\s+TABLE\s+\Q$quoted_artist/msi, "$db DDL contains expected quoted table name");