(optdeps) One last pass through tests, streamline skip messages
[dbsrgits/DBIx-Class.git] / t / storage / quote_names.t
index bf46122..ff82d9f 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 = (
@@ -50,8 +52,11 @@ my %expected = (
 );
 
 for my $class (keys %expected) { SKIP: {
-  eval "require ${class}"
-    or skip "Skipping test of quotes for $class due to missing dependencies", 1;
+
+  eval "require ${class}" or do {
+    note "Failed load of $class:\n\n$@\n\n";
+    skip "Skipping test of quotes for $class due to missing compile-time dependencies", 1;
+  };
 
   my $mapping = $expected{$class};
   my ($quote_char, $name_sep) = @$mapping{qw/quote_char name_sep/};
@@ -89,7 +94,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
@@ -130,7 +137,7 @@ for my $db (sort {
   # if something was produced - it better be quoted
   if (
     # the SQLT producer has no idea what quotes are :/
-    $db ne 'SYBASE'
+    ! grep { $db eq $_ } qw( SYBASE DB2 )
       and
     my $ddl = try { $schema->deployment_statements }
   ) {