Optionally aggreagate tests.
[catagits/Catalyst-Runtime.git] / Makefile.PL
index dc525a3..2f50b48 100644 (file)
@@ -33,7 +33,12 @@ requires 'URI' => '1.35';
 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
 requires 'MRO::Compat';
 
-tests 't/*.t t/aggregate/*.t';
+if (   ( exists $ENV{AGGREGATE_TESTS} && !$ENV{AGGREGATE_TESTS})
+    || (!exists $ENV{AGGREGATE_TESTS} && !can_use('Test::Aggregate'))) {
+    tests join q{ },
+        grep { $_ ne 't/aggregate.t' }
+        map  { glob } qw[t/*.t t/aggregate/*.t];
+}
 
 if (-e 'inc/.author') {
   build_requires 'Test::NoTabs';