X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=b0207a7b25c0c1a54cd452893b7ae0c40bb9592c;hb=refs%2Fheads%2Fcurrent%2Fdq;hp=69340925774f38a47b70dc3bdd8c3bd793781ac3;hpb=2231d31c29347c34a6b58b88782da220775bddaa;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index 6934092..b0207a7 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -4,6 +4,9 @@ package # hide from PAUSE 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 @@ -18,6 +21,32 @@ BEGIN { } } +# 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 )) {