From: Andy Grundman Date: Tue, 18 Oct 2005 04:01:44 +0000 (+0000) Subject: Fixed http-server tests so it reads test results X-Git-Tag: 5.7099_04~1199 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=4678828c308a9cabca4727a7dd08855a9e8e8473 Fixed http-server tests so it reads test results --- diff --git a/t/optional/http-server-restart.t b/t/optional/http-server-restart.t index da1b313..d8fa69f 100644 --- a/t/optional/http-server-restart.t +++ b/t/optional/http-server-restart.t @@ -78,7 +78,6 @@ for ( 1..20 ) { close $pm; # give the server time to notice the change - my $count = 0; sleep 1; if ( check_port( 'localhost', $port ) != 1 ) { die "Server appears to have died"; diff --git a/t/optional/http-server.t b/t/optional/http-server.t index 1dd4fea..44340e2 100644 --- a/t/optional/http-server.t +++ b/t/optional/http-server.t @@ -11,6 +11,7 @@ eval "use File::Copy::Recursive"; plan skip_all => 'set TEST_HTTP to enable this test' unless $ENV{TEST_HTTP}; plan skip_all => 'File::Copy::Recursive required' if $@; +plan tests => 28; # clean up rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var"; @@ -36,7 +37,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/' ); +my $output = `prove -r -Ilib/ t/live/`; + +foreach my $line ( split /\n/, $output ) { + if ( $line !~ /skipped|wallclock/ ) { + like( $line, qr/ok$/, 'test ok' ); + } +} # shut it down kill 2, $pid;