From: Florian Ragwitz Date: Thu, 4 Sep 2008 08:15:54 +0000 (+0000) Subject: Optionally aggreagate tests. X-Git-Tag: 5.8000_03~64^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=bf6d41befe434ea682a1e20dcb090e05237d713a Optionally aggreagate tests. --- diff --git a/Makefile.PL b/Makefile.PL index dc525a3..2f50b48 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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'; diff --git a/t/aggregate.t b/t/aggregate.t new file mode 100644 index 0000000..fc10888 --- /dev/null +++ b/t/aggregate.t @@ -0,0 +1,17 @@ +#!perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +use Test::Aggregate; + +my $tests = Test::Aggregate->new({ + dirs => 't/aggregate', + verbose => 1, + set_filenames => 1, +}); + +$tests->run;