From: Andy Grundman Date: Mon, 18 Dec 2006 17:37:07 +0000 (+0000) Subject: Run just one test by passing it as the first arg X-Git-Tag: 5.7099_04~251 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=547f880602b1b5f8b89839829763b2e36dbd29e7 Run just one test by passing it as the first arg --- 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;