Skip to content

Commit

Permalink
[t] Mark known test failures with JIT and CGP as TODO.
Browse files Browse the repository at this point in the history
The switch core is horribly broken.

git-svn-id: https://svn.parrot.org/parrot/trunk@18564 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
chromatic committed May 16, 2007
1 parent 0421648 commit 9a7c6ae
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 22 deletions.
4 changes: 2 additions & 2 deletions compilers/imcc/parser_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ imcc_compile_file(Parrot_Interp interp, const char *fullname,

fs = string_make(interp, fullname, strlen(fullname), NULL, 0);
if (Parrot_stat_info_intval(interp, fs, STAT_ISDIR)) {
IMCC_fatal(interp, E_IOError,
real_exception(interp, NULL, E_IOError,
"imcc_compile_file: '%s' is a directory\n", fullname);
return NULL;
}
Expand Down Expand Up @@ -871,7 +871,7 @@ void *
IMCC_compile_file_s(Parrot_Interp interp, const char *s,
STRING **error_message)
{
return imcc_compile_file(interp, s , error_message);
return imcc_compile_file(interp, s , error_message);
}

/* Register additional compilers with the interpreter */
Expand Down
7 changes: 6 additions & 1 deletion t/compilers/imcc/syn/errors.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Config;
use Parrot::Test tests => 4;
use Parrot::Test;

plan skip_all => 'No reason to compile invalid PBC here'
if $ENV{TEST_PROG_ARGS} =~ /-r/;

plan tests => 4;

## tests for imcc error messages

Expand Down
4 changes: 3 additions & 1 deletion t/dynoplibs/myops.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ CODE
OUTPUT

{
my @todo;
@todo = ( todo => 'broken with -j' ) if $ENV{TEST_PROG_ARGS} =~ /-j/;
my $quine = <<'END_PASM';
.loadlib "myops_ops"
q
END_PASM
pasm_output_is( $quine, $quine, 'a short cheating quine' );
pasm_output_is( $quine, $quine, 'a short cheating quine', @todo );
}

pir_output_is( << 'CODE', << 'OUTPUT', "one alarm" );
Expand Down
3 changes: 3 additions & 0 deletions t/examples/japh.t
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ if ( $PConfig{bigendian} ) {
if ( $PConfig{intvalsize} == 8 ) {
$todo{8} = 'works only with 32-bit integer values';
}
if ( $ENV{TEST_PROG_ARGS} =~ /-j/) {
$todo{4} = 'broken with -j';
}

# run all tests and tell about todoness
foreach ( 1 .. 17 ) {
Expand Down
3 changes: 3 additions & 0 deletions t/op/01-parse_ops.t
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ for my $op (@$Parrot::OpLib::core::ops) {
plan skip_all => 'IMCC cannot do parse-only with JIT enabled'
if $ENV{TEST_PROG_ARGS} =~ /-j/;

plan skip_all => 'IMCC cannot do parse-only with switched core'
if $ENV{TEST_PROG_ARGS} =~ /-S/;

plan tests => scalar keys %cmds;

for my $cmd ( sort keys %cmds ) {
Expand Down
39 changes: 21 additions & 18 deletions t/pmc/threads.t
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ SKIP: {
print I5
print "\n"
# get tid of thread
$I0 = thread
$I0 = thread
# wait for it
thread.'join'()
.end
.sub foo
.sub foo
# check if vars are fresh
inc I5
print "thread"
Expand Down Expand Up @@ -134,12 +134,12 @@ loop:
print I5
print "\n"
# get tid of thread
$I0 = thread
$I0 = thread
# wait for it
thread.'join'()
.end
.sub foo
.sub foo
# check if vars are fresh
inc I5
print "thread"
Expand Down Expand Up @@ -296,7 +296,7 @@ SKIP: {
queue = new .TQueue # flag for when the thread is done
thread = new .ParrotThread
thread.'run_clone'(foo, queue)
thread.'detach'()
wait:
defined $I0, queue
Expand Down Expand Up @@ -330,7 +330,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "share a PMC" );
thread.'run_clone'(foo, shared_ref)
sleep 0.1 # to let the thread run
.local pmc result
thread.'join'()
print "done\n"
Expand Down Expand Up @@ -366,7 +366,7 @@ pir_output_is( <<'CODE', <<'OUT', "multi-threaded" );
tmpInt = new Integer
tmpInt = 3
push queue, tmpInt
.local pmc thread
thread = new ParrotThread
.local pmc foo
Expand All @@ -383,7 +383,7 @@ pir_output_is( <<'CODE', <<'OUT', "multi-threaded" );
print "\n"
loop:
$I0 = queue
if $I0 == 0 goto done
if $I0 == 0 goto done
shift $P0, queue
print $P0
print "\n"
Expand Down Expand Up @@ -479,7 +479,7 @@ okay:
thread = new ParrotThread
.local pmc thread_func
thread_func = global 'thread_func'
$I0 = .PARROT_CLONE_CODE
$I0 = .PARROT_CLONE_CODE
thread.'run'($I0, thread_func, test2)
thread.'join'()
print "ok 5\n"
Expand Down Expand Up @@ -516,7 +516,7 @@ okay:
print "\n"
.end
.sub thread_test_func
.sub thread_test_func
$P0 = find_global 'Bar', 'alpha'
'is'($P0, 1, 'Bar::alpha == 1', 'alpha')
$P0 = 43
Expand All @@ -533,7 +533,7 @@ okay:
.namespace [ 'main' ]
.sub test_setup
.sub test_setup
$P0 = new Integer
$P0 = 1
store_global 'Bar', 'alpha', $P0
Expand Down Expand Up @@ -597,7 +597,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "CLONE_CODE | CLONE_CLASSES; superclass not
.namespace [ 'main' ]
.sub init
.sub init
$P1 = newclass 'Foo'
addattribute $P1, 'foo1'
addattribute $P1, 'foo2'
Expand Down Expand Up @@ -682,7 +682,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "CLONE_CODE | CLONE_CLASSES; superclass bui
.namespace [ 'main' ]
.sub init
.sub init
$P0 = getclass .Integer
$P1 = subclass $P0, 'Foo'
addattribute $P1, 'foo1'
Expand Down Expand Up @@ -747,7 +747,7 @@ OUTPUT

pir_output_is( <<'CODE', <<'OUTPUT', "CLONE_CODE | CLONE_GLOBALS| CLONE_HLL" );
.HLL 'Test', ''
.sub setup
.sub setup
$P0 = new .Integer
$P0 = 42
store_global 'x', $P0
Expand Down Expand Up @@ -804,7 +804,10 @@ ok 1
ok 2
OUTPUT

pir_output_unlike( <<'CODE', qr/not/, "globals + constant table subs issue" );
my @todo;
@todo = ( todo => 'Broken with CGP' ) if $ENV{TEST_PROG_ARGS} =~ /-C/;
@todo = ( todo => 'Broken with JIT' ) if $ENV{TEST_PROG_ARGS} =~ /-j/;
pir_output_unlike( <<'CODE', qr/not/, "globals + constant table subs issue", @todo );
.namespace [ 'Foo' ]
.include 'interpinfo.pasm'
Expand Down Expand Up @@ -922,10 +925,10 @@ okay:
.sub main :main
$P0 = new Integer
$P0 = new Integer
$P0 = 1
store_global 'test_num', $P0
.const .Sub _check = 'full_check'
_check()
Expand Down Expand Up @@ -988,7 +991,7 @@ okay:
PerlIntType = find_type 'PerlInt'
passed = new PerlIntType
passed = 15
.local pmc thread_func
thread_func = global 'test'
print "in thread:\n"
Expand Down

0 comments on commit 9a7c6ae

Please sign in to comment.