Avoid super long command lines when not aggregating
Florian Ragwitz [Tue, 8 Mar 2011 21:52:15 +0000 (22:52 +0100)]
This probably also fixes prove -lr t/, which people have been complaining about
every now and then.

Makefile.PL
t/aggregate.t

index 4a71977..857a643 100644 (file)
@@ -64,10 +64,9 @@ if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::A
 }
 else {
     unlink '.aggregating';
-    tests join q{ },
-        grep { $_ ne 't/aggregate.t' }
-        map  { glob } qw[t/*.t t/aggregate/*.t];
+    tests 't/*.t t/aggregate/*.t';
 }
+
 author_requires 'CatalystX::LeakChecker', '0.05';
 author_requires 'File::Copy::Recursive'; # For http server test
 
index 6722046..543fe02 100644 (file)
@@ -5,6 +5,14 @@ use warnings;
 
 use FindBin;
 use lib "$FindBin::Bin/lib";
+use File::Spec::Functions 'catfile', 'updir';
+
+BEGIN {
+    unless (-e catfile $FindBin::Bin, updir, '.aggregating') {
+        require Test::More;
+        Test::More::plan(skip_all => 'No test aggregation requested');
+    }
+}
 
 BEGIN {
     unless (eval { require Test::Aggregate; Test::Aggregate->VERSION('0.364'); 1 }) {