Skip to content

Commit

Permalink
add a "nt" make target that runs tests written in NQP
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Apr 5, 2010
1 parent fde0149 commit cec4700
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions build/Makefile.in
Expand Up @@ -125,6 +125,9 @@ help:
test: build
$(PERL) -I$(LIB_DIR)/tools/lib t/harness --bindir=$(BIN_DIR)

nt: build
$(PERL) -I$(LIB_DIR)/tools/lib t/harness --bindir=$(BIN_DIR) --nt

# basic run for missing libs
test-installable: installable
echo "1" | ./installable_blizkost@exe@
Expand Down
20 changes: 14 additions & 6 deletions t/harness
Expand Up @@ -10,13 +10,10 @@ use 5.008;

my $pbc = 'perl5.pbc';

my @tests = (<t/*.t>,<t/*/*.t>, <t/spec/*/*.t>);

our %harness_args = (
language => 'blizkost',
verbosity => 0,
jobs => $ENV{TEST_JOBS} || 1,
files => \@tests,
merge => 0,
);

Expand All @@ -26,12 +23,23 @@ GetOptions(
# A sensible default is num_cores + 1.
# Many people have two cores these days.
'jobs:3' => \$harness_args{jobs},
'nt' => \my $nt,
);

if ($bindir) {
$harness_args{exec} = [$bindir.'/parrot', $pbc ];
my @tests;

if ($nt) {
$harness_args{files} = [ <nt/*.t> ];
} else {
$harness_args{files} = [ <t/*.t>,<t/*/*.t>, <t/spec/*/*.t> ];
}
else {

if ($nt) {
die "Need to provide --bindir together with --nt option" unless $bindir;
$harness_args{exec} = [$bindir . '/parrot-nqp'];
} elsif ($bindir) {
$harness_args{exec} = [$bindir.'/parrot', $pbc ];
} else {
$harness_args{compiler} = $pbc;
}

Expand Down

0 comments on commit cec4700

Please sign in to comment.