Skip to content

Commit

Permalink
skip tests early if perlbal is not in PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Feb 27, 2010
1 parent 8bb3e45 commit 700e9a1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions t/perlbal.t
Expand Up @@ -9,17 +9,16 @@ use FindBin;
use Plack::Test::Suite;


chomp(my $perlbal_bin = `which perlbal`);
plan skip_all => 'perlbal not found in PATH'
unless $perlbal_bin && -x $perlbal_bin;

Plack::Test::Suite->run_server_tests(\&run_perlbal);
done_testing();

sub run_perlbal {
my $port = shift;

chomp(my $perlbal_bin = `which perlbal`);

plan skip_all => 'perlbal not found in PATH'
unless $perlbal_bin && -x $perlbal_bin;

my $tmpdir = File::Temp::tempdir( CLEANUP => 1 );

write_file("$tmpdir/app.psgi", _render_psgi());
Expand Down

0 comments on commit 700e9a1

Please sign in to comment.