Permalink
Browse files

add a "nt" make target that runs tests written in NQP

  • Loading branch information...
1 parent fde0149 commit cec470016e66b462ddeb2601fc6e6f44e0f2737e @moritz moritz committed Apr 5, 2010
Showing with 17 additions and 6 deletions.
  1. +3 −0 build/Makefile.in
  2. +14 −6 t/harness
View
@@ -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@
View
@@ -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,
);
@@ -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;
}

0 comments on commit cec4700

Please sign in to comment.