# http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch294.htm#993
# Oracle Database Reference 10g Release 2 (10.2)
# http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2107.htm#sthref1297
- todo_skip "On Oracle8i all_triggers view is empty, i don't yet know why...", 1
+ todo_skip "FIXME: On Oracle8i all_triggers view is empty, i don't yet know why...", 1
if $schema->storage->_server_info->{normalized_dbms_version} < 9;
my $schema2 = $schema->connect($dsn2, $user2, $pass2, $opt);
use warnings;
use Test::More;
-use DBIx::Class::Optional::Dependencies ();
use DBICTest;
use Test::More;
use Test::Exception;
use Try::Tiny;
-use DBIx::Class::Optional::Dependencies ();
use DBICTest;
'and "nonpkid_seq" and the trigger "artist_bi".',
) unless grep { $ENV{"${_}_DSN"} } keys %$env2optdep;
-# tests stolen from 749sybase_asa.t
-
# Example DSNs:
# dbi:Firebird:db=/var/lib/firebird/2.5/data/hlaghdb.fdb
# dbi:InterBase:db=/var/lib/firebird/2.5/data/hlaghdb.fdb
for my $prefix (shuffle keys %$env2optdep) { SKIP: {
- skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1)
- unless DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix});
+ DBIx::Class::Optional::Dependencies->skip_without( $env2optdep->{$prefix} );
my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
-
note "Testing with ${prefix}_DSN";
$schema = DBICTest::Schema->connect($dsn, $user, $pass, {
);
-if ($ENV{DBICTEST_MEMCACHED}) {
- if (DBIx::Class::Optional::Dependencies->req_ok_for ('test_memcached')) {
+SKIP: {
+ DBIx::Class::Optional::Dependencies->skip_without('test_memcached');
+
my $memcached = Cache::Memcached->new(
{ servers => [ $ENV{DBICTEST_MEMCACHED} ] }
);
local $DBIx::Class::ResultSourceHandle::thaw_schema = $schema;
return $memcached->get($key);
};
- }
- else {
- SKIP: {
- skip 'Memcached tests need ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_memcached'), 1;
- }
- }
-}
-else {
- SKIP: {
- skip 'Set $ENV{DBICTEST_MEMCACHED} to run the memcached serialization tests', 1;
- }
}
-
-
for my $name (keys %stores) {
my $store = $stores{$name};
use Test::Exception;
use Scalar::Util ();
-
use DBICTest;
use DBIx::Class::_Util 'sigwarn_silencer';
for my $prefix (keys %$env2optdep) { SKIP: {
- my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
-
- next unless $dsn;
+ DBIx::Class::Optional::Dependencies->skip_without( $env2optdep->{$prefix} );
note "Testing with ${prefix}_DSN";
- skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1)
- unless DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix});
+ my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
$schema = DBICTest::Schema->connect($dsn, $user, $pass, {
quote_char => '"',
my $deparser;
sub is_same_src { SKIP: {
- skip "Skipping comparison of unicode-posioned source", 1
+ skip "Skipping comparison of unicode-poisoned source", 1
if DBIx::Class::_ENV_::STRESSTEST_UTF8_UPGRADE_GENERATED_COLLAPSER_SOURCE;
$deparser ||= B::Deparse->new;
# make sure connection-less storages do not throw on _determine_driver
# but work with ENV at the same time
SKIP: for my $env_dsn (undef, (DBICTest->_database)[0] ) {
- skip 'Subtest relies on being connected to SQLite', 1
+
+ skip 'This set of tests relies on being connected to SQLite', 1
if $env_dsn and $env_dsn !~ /\:SQLite\:/;
local $ENV{DBI_DSN} = $env_dsn || '';
for my $type (qw/PG MYSQL SQLite/) {
SKIP: {
+
+ DBIx::Class::Optional::Dependencies->skip_without( 'test_rdbms_' . lc $type );
+
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/}
- }
+ ? ( DBICTest->_database(sqlite_use_file => 1) )
+ : ( @ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/} )
;
- if ($type eq 'PG') {
- skip "skipping Pg tests without dependencies installed", 1
- unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_pg');
- }
- elsif ($type eq 'MYSQL') {
- skip "skipping MySQL tests without dependencies installed", 1
- unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mysql');
- }
-
my $schema = DBICTest::Schema->connect (@dsn);
# emulate a singleton-factory, just cache the object *somewhere in a different package*
);
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/};
my $prefix;
if ($prefix = $_) {
- my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
- skip ("Skipping tests with $prefix: set \$ENV{${prefix}_DSN} _USER and _PASS", 1)
- unless $dsn;
+ DBIx::Class::Optional::Dependencies->skip_without($env2optdep->{$prefix});
- skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1)
- unless DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix});
+ my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
$schema = DBICTest::Schema->connect ($dsn,$user,$pass,{ auto_savepoint => 1 });
is_deeply( $schema->storage->savepoints, [], 'All savepoints forgotten' );
SKIP: {
- skip "Reading inexplicably fails on very old replicated DBD::SQLite<1.33", 1 if (
+ skip "FIXME: Reading inexplicably fails on very old replicated DBD::SQLite<1.33", 1 if (
$ENV{DBICTEST_VIA_REPLICATED}
and
$prefix eq 'SQLite Internal DB'
SKIP: for my $count (1 .. 5) {
- skip 'Weird DBI General Protection Faults, skip forking tests (RT#63104)', 5
+ skip 'FIXME: Weird DBI General Protection Faults, skip forking tests (RT#63104)', 5
if $^O eq 'MSWin32';
my $pid = fork();