X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fdefault.t;fp=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fdefault.t;h=810c3e839515d15c1372554111db0913c8ec7574;hb=232fd39402371d9550ad97d92a4ceafd283874b0;hp=0354c95c59091177df9d69bc07150cbad69c5813;hpb=1c773d181e88f0e97195456526b1cf222a80b8e4;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/default.t b/t/live/component/controller/action/default.t index 0354c95..810c3e8 100644 --- a/t/live/component/controller/action/default.t +++ b/t/live/component/controller/action/default.t @@ -6,10 +6,24 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 120; +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } + +use Test::More tests => 12*$iters; use Catalyst::Test 'TestApp'; -for ( 1 .. 10 ) { +if ( $ENV{CAT_BENCHMARK} ) { + require Benchmark; + Benchmark::timethis( -$iters, \&run_tests ); +} +else { + for ( 1 .. $iters ) { + run_tests(); + } +} + +sub run_tests { { my @expected = qw[ TestApp::Controller::Action::Default->begin