From: Peter Rabbitson Date: Tue, 11 Dec 2012 10:28:52 +0000 (+0100) Subject: Do not grab a global lock if test won't run X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad7fbbc0624b6572adf454d8eaa9aec474278a15;p=dbsrgits%2FDBIx-Class-Historic.git Do not grab a global lock if test won't run --- diff --git a/t/zzzzzzz_perl_perf_bug.t b/t/zzzzzzz_perl_perf_bug.t index c0a96d8..f67c854 100644 --- a/t/zzzzzzz_perl_perf_bug.t +++ b/t/zzzzzzz_perl_perf_bug.t @@ -1,8 +1,19 @@ use strict; use warnings; use Test::More; -use Benchmark; use lib qw(t/lib); + +BEGIN { + plan skip_all => + 'Skipping RH perl performance bug tests as DBIC_NO_WARN_BAD_PERL set' + if ( $ENV{DBIC_NO_WARN_BAD_PERL} ); + + require DBICTest::RunMode; + plan skip_all => 'Skipping as system appears to be a smoker' + if DBICTest::RunMode->is_smoker; +} + +use Benchmark; use DBICTest ':GlobalLock'; # This is a rather unusual test. @@ -19,13 +30,6 @@ use DBICTest ':GlobalLock'; # Perl Performance Issues on Red Hat Systems in # L -plan skip_all => - 'Skipping RH perl performance bug tests as DBIC_NO_WARN_BAD_PERL set' - if ( $ENV{DBIC_NO_WARN_BAD_PERL} ); - -plan skip_all => 'Skipping as system appears to be a smoker' - if DBICTest::RunMode->is_smoker; - plan tests => 3; ok( 1, 'Dummy - prevents next test timing out' );