Skip to content

Commit

Permalink
Run tests with ./pipp
Browse files Browse the repository at this point in the history
Workaround for t/embed/eval.t
  • Loading branch information
bschmalhofer committed Mar 4, 2009
1 parent 63e6188 commit 7ced896
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
11 changes: 8 additions & 3 deletions t/embed/eval.t
Expand Up @@ -14,11 +14,16 @@ Tests the sub 'eval' used for supporting embedding Pipp in other applications.

=cut

.sub '_load' :anon :init :load
#.sub '_load' :anon :init :load

load_bytecode 'pipp.pbc'
## loadbytecode fails when script is run by ./pipp --run-pir
# push_eh _ignore_exception
# load_bytecode 'pipp.pbc'

.end
#_ignore_exception:
#pop_eh

#.end

.sub 'main' :main
.include "include/test_more.pir"
Expand Down
21 changes: 8 additions & 13 deletions t/harness
Expand Up @@ -54,15 +54,12 @@ my $verbosity = $verbose_flag ? 1 : $ENV{HARNESS_VERBOSE};
$verbosity ||= 0;

{
my $path_to_parrot = path_to_parrot();
my @cmd = ( "$path_to_parrot/parrot", 'pipp.pbc' );
my @php_cmd;
if ( $php_flag ) { @php_cmd = qw{ php-cgi -q -C -n } ; }
elsif ( $phc_flag ) { @php_cmd = ( './pipp', '--variant=phc' ); }
else { @php_cmd = ( './pipp' ) }

if ( $php_flag ) {
@cmd = qw{ php-cgi -q -C -n } ;
}
elsif ( $phc_flag ) {
push @cmd, '--variant=phc';
}
my @pir_cmd = ( './pipp', '--run-pir' );

my @files;
if ( scalar(@ARGV) ) {
Expand All @@ -84,15 +81,13 @@ $verbosity ||= 0;
my ( $harness, $test_file ) = @_;

# the directory t/embed contains only PIR test files
return [ "$path_to_parrot/parrot", 'pipp.pbc', '--run-pir', $test_file ] if $test_file =~ m!t/embed/.*[.]t$!;
#return [ "$path_to_parrot/parrot", $test_file ] if $test_file =~ m!t/embed/.*[.]t$!;
return [ @pir_cmd, '--run-pir', $test_file ] if $test_file =~ m!t/embed/.*[.]t$!;

# the directory t/pmc contains only PIR test files
return [ "$path_to_parrot/parrot", 'pipp.pbc', '--run-pir', $test_file ] if $test_file =~ m!t/pmc/.*[.]t$!;
#return [ "$path_to_parrot/parrot", $test_file ] if $test_file =~ m!t/pmc/.*[.]t$!;
return [ @pir_cmd, $test_file ] if $test_file =~ m!t/pmc/.*[.]t$!;

# the directory t/in_php contains only test scripts written in PHP
return [ @cmd, $test_file ] if $test_file =~ m!t/in_php/.*[.]t$!;
return [ @php_cmd, $test_file ] if $test_file =~ m!t/in_php/.*[.]t$!;

# all other directories contain test scripts written in Perl
return [ $^X, $test_file ];
Expand Down

0 comments on commit 7ced896

Please sign in to comment.