X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FRunMode.pm;h=bdb569a5033177d352dfb7e7416f91fe0b5f14f1;hb=a63c42fc0b2844ff59bc86719fbe2c779067f171;hp=7611e4c82865c8e2281bef7175996d202cca0588;hpb=9b871b00c2d332f53b68b2e98286aa8a116d2c19;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/RunMode.pm b/t/lib/DBICTest/RunMode.pm index 7611e4c..bdb569a 100644 --- a/t/lib/DBICTest/RunMode.pm +++ b/t/lib/DBICTest/RunMode.pm @@ -26,7 +26,7 @@ _check_author_makefile() unless $ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}; # https://rt.cpan.org/Ticket/Display.html?id=76663 my $tmpdir; sub tmpdir { - $tmpdir ||= do { + dir ($tmpdir ||= do { my $dir = dir(File::Spec->tmpdir); @@ -40,8 +40,8 @@ sub tmpdir { $dir->mkpath; } - $dir; - }; + $dir->stringify; + }); } @@ -95,7 +95,6 @@ sub _check_author_makefile { if (@fail_reasons) { print STDERR <<'EOE'; - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================== FATAL ERROR =========================== !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -105,7 +104,7 @@ checkout and that you, the user, did not run `perl Makefile.PL` before using this code. You absolutely _must_ perform this step, to ensure you have all required dependencies present. Not doing so often results in a lot of wasted time for other contributors -trying to assit you with spurious "its broken!" problems. +trying to assist you with spurious "its broken!" problems. By default DBICs Makefile.PL turns all optional dependenciess into *HARD REQUIREMENTS*, in order to make sure that the entire test @@ -132,6 +131,9 @@ EOE } print STDERR "\n\n\n"; + require Time::HiRes; + Time::HiRes::sleep(0.005); + print STDOUT "\nBail out!\n"; exit 1; } } @@ -150,7 +152,11 @@ sub is_author { } sub is_smoker { - return ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) + return + ( ($ENV{TRAVIS}||'') eq 'true' ) + || + ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) + ; } sub is_plain {