Skip to content

Commit

Permalink
update setup.pir so that it bypasses distutils test logic and runs my…
Browse files Browse the repository at this point in the history
… test harness directly.
  • Loading branch information
Whiteknight committed May 22, 2010
1 parent fb8df75 commit 66dd634
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
15 changes: 11 additions & 4 deletions setup.pir
Expand Up @@ -60,11 +60,18 @@ SOURCES
$P2['linalg_group'] = $P3
$P0['dynpmc'] = $P2


# test
$S0 = args[0]
if $S0 != "test" goto no_test
$S0 = get_nqp()
$P0['harness_exec'] = $S0
$P0['harness_files'] = ''
$S0 = $S0 . " t/harness"
$I0 = spawnw $S0
exit $I0
# test
#$S0 = get_nqp()
#$S0 = $S0 . " t/harness"
#$P0['test_exec'] = $S0
no_test:


# dist
$P5 = glob('src/pmc/pla_matrix_types.h src/*.pir src/*.m examples/*.pir tools/nci/*.pl')
Expand Down
2 changes: 1 addition & 1 deletion t/harness
@@ -1,7 +1,7 @@
#! parrot-nqp

INIT {
pir::load_bytecode('./library/kakapo_full.pbc');
pir::load_bytecode('kakapo_full.pbc');
Nqp::compile_file('t/testlib/matrixtest.nqp');
}

Expand Down
8 changes: 4 additions & 4 deletions t/sanity.t
@@ -1,7 +1,7 @@
#! parrot-nqp

INIT {
pir::load_bytecode('./library/kakapo_full.pbc');
pir::load_bytecode('kakapo_full.pbc');
}

class Test::Sanity is UnitTest::Testcase;
Expand All @@ -13,12 +13,12 @@ INIT {

MAIN();
sub MAIN() {
my $proto := Opcode::get_root_global(pir::get_namespace__P().get_name);
$proto.suite.run;
my $proto := Opcode::get_root_global(pir::get_namespace__P().get_name);
$proto.suite.run;
}

method test_load_linalg_group() {
my $pla := pir::loadlib__ps("./linalg_group");
my $pla := pir::loadlib__ps("./dynext/linalg_group");
assert_not_instance_of($pla, "Undef", "Cannot load PLA library, linalg_group");
}

0 comments on commit 66dd634

Please sign in to comment.