Skip to content

Commit

Permalink
Merge pull request pherkin#109 from ehuelsmann/tap-source
Browse files Browse the repository at this point in the history
Fix blocking 'prove' (on my system)
  • Loading branch information
Peter Sergeant committed Sep 12, 2016
2 parents c6c259c + 8aaf499 commit 12c00ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/TAP/Parser/SourceHandler/Feature.pm
Expand Up @@ -7,6 +7,8 @@ use Path::Class qw/file/;

use base 'TAP::Parser::SourceHandler';

use TAP::Parser::Iterator::Stream;

use App::pherkin;

use Test::BDD::Cucumber::Loader;
Expand Down Expand Up @@ -70,9 +72,13 @@ sub make_iterator {
my $tb = Test::Builder->create();
$tb->output($output_fh);

my $it = TAP::Parser::Iterator::Stream->new($input_fh);
fork and return $it;
my $pid = fork;
if ($pid) {
close $output_fh;
return TAP::Parser::Iterator::Stream->new($input_fh);
}

close $input_fh;
my $harness = Test::BDD::Cucumber::Harness::TestBuilder->new(
{ fail_skip => 1,
_tb_instance => $tb,
Expand All @@ -95,6 +101,7 @@ sub make_iterator {

$pherkin->_run_tests( $executor, $feature );

close $output_fh;
exit;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Test/BDD/Cucumber/StepFile.pm
Expand Up @@ -146,6 +146,8 @@ sub load {
my ( $class, $filename ) = @_;
{
local @definitions;

# Debian Jessie with security patches requires an absolute path
do File::Spec->rel2abs($filename);
die "Step file [$filename] failed to load: $@" if $@;
return @definitions;
Expand Down

0 comments on commit 12c00ae

Please sign in to comment.