use strict;
use warnings;
+# Needs to load 1st so that the correct SQLA::Test is picked up
+use DBIx::Class::_TempExtlib;
+
# this noop trick initializes the STDOUT, so that the TAP::Harness
# issued IO::Select->can_read calls (which are blocking wtf wtf wtf)
# keep spinning and scheduling jobs
}
}
+# This is a pretty good candidate for a standalone extraction (Test::AutoSkip?)
+BEGIN {
+ if (
+ ! $ENV{RELEASE_TESTING}
+ and
+ ! $ENV{AUTHOR_TESTING}
+ and
+ $0 =~ /^ (.*) x?t [\/\\] .+ \.t $/x
+ and
+ -f ( my $fn = "$1.auto_todo")
+ ) {
+ # fuck you win32
+ require File::Spec;
+ my $canonical_dollarzero = File::Spec::Unix->catpath(File::Spec->splitpath($0));
+
+ for my $t ( map {
+ ( $_ =~ /^ \s* ( [^\#\n]+ ) /x ) ? $1 : ()
+ } do { local @ARGV = $fn; <> } ) {
+ if ( $canonical_dollarzero =~ m! (?: \A | / ) \Q$t\E \z !x ) {
+ require Test::Builder;
+ Test::Builder->new->todo_start("Global todoification of '$t' specified in $fn");
+ }
+ }
+ }
+}
+
use Module::Runtime 'module_notional_filename';
BEGIN {
for my $mod (qw( DBIC::SqlMakerTest SQL::Abstract )) {
# no fsync on commit
$dbh->do ('PRAGMA synchronous = OFF');
- if ($ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER}) {
-
- $storage->throw_exception(
- 'PRAGMA reverse_unordered_selects does not work correctly before libsqlite 3.7.9'
- ) if $storage->_server_info->{normalized_dbms_version} < 3.007009;
-
+ if (
+ $ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER}
+ and
+ # the pragma does not work correctly before libsqlite 3.7.9
+ $storage->_server_info->{normalized_dbms_version} >= 3.007009
+ ) {
$dbh->do ('PRAGMA reverse_unordered_selects = ON');
}