X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Foptional_http-server.t;fp=t%2Foptional_http-server.t;h=fbef97f4cfdd1336e82c8d0651998a43fb0a1a9e;hb=547f880602b1b5f8b89839829763b2e36dbd29e7;hp=4b69d8096e9113b4ee50ed939f4914e6b7778ff5;hpb=a147e337604ac9553bafe7661b03a75d1fbeeca3;p=catagits%2FCatalyst-Runtime.git diff --git a/t/optional_http-server.t b/t/optional_http-server.t index 4b69d80..fbef97f 100644 --- a/t/optional_http-server.t +++ b/t/optional_http-server.t @@ -15,6 +15,9 @@ eval "use File::Copy::Recursive"; plan skip_all => 'File::Copy::Recursive required' if $@; plan tests => 1; +# Run a single test by providing it as the first arg +my $single_test = shift; + # clean up rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp"; @@ -42,7 +45,13 @@ while ( check_port( 'localhost', $port ) != 1 ) { # run the testsuite against the HTTP server $ENV{CATALYST_SERVER} = "http://localhost:$port"; -system( 'prove -r -Ilib/ t/live_*' ); + +if ( $single_test ) { + system( "perl -Ilib/ $single_test" ); +} +else { + system( 'prove -r -Ilib/ t/live_*' ); +} # shut it down kill 'INT', $pid;