Clarify travis timings
[dbsrgits/DBIx-Class.git] / t / zzzzzzz_perl_perf_bug.t
index 8bed2d7..f67c854 100644 (file)
@@ -1,9 +1,21 @@
-#!/usr/bin/perl
 use strict;
 use warnings;
 use Test::More;
 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.
 # It does not test any aspect of DBIx::Class, but instead tests the
 # perl installation this is being run under to see if it is:-
@@ -18,16 +30,6 @@ use lib qw(t/lib);
 # Perl Performance Issues on Red Hat Systems in
 # L<DBIx::Class::Manual::Troubleshooting>
 
-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 AUTOMATED_TESTING is set'
-  if ( $ENV{AUTOMATED_TESTING} );
-
-eval "use Benchmark ':all'";
-plan skip_all => 'needs Benchmark for testing' if $@;
-
 plan tests => 3;
 
 ok( 1, 'Dummy - prevents next test timing out' );
@@ -68,7 +70,7 @@ ok( ( $ratio < 2 ), 'Overload/bless performance acceptable' )
     "in the Troubleshooting POD documentation entitled\n",
     "'Perl Performance Issues on Red Hat Systems'\n",
     "As this is an extremely serious condition, the only way to skip\n",
-    "over this test is to --force the installation, or to edit the test\n",
+    "over this test is to --force the installation, or to look in the test\n",
     "file " . __FILE__ . "\n",
   );
 
@@ -115,7 +117,7 @@ SKIP: {
         "Please read the section in the Troubleshooting POD documentation\n",
         "entitled 'Perl Performance Issues on Red Hat Systems'\n",
         "As this is an extremely serious condition, the only way to skip\n",
-        "over this test is to --force the installation, or to edit the test\n",
+        "over this test is to --force the installation, or to look in the test\n",
         "file " . __FILE__ . "\n",
       );
 }