Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (37 sloc) 1003 Bytes
#! perl
# $Id$
# pragmata
use strict;
use warnings;
use Getopt::Long;
use 5.008;
my $pbc = 'perl5.pbc';
our %harness_args = (
language => 'blizkost',
verbosity => 0,
jobs => $ENV{TEST_JOBS} || 1,
merge => 0,
);
GetOptions(
'verbosity=i' => \$harness_args{verbosity},
'bindir=s' => \my $bindir,
# A sensible default is num_cores + 1.
# Many people have two cores these days.
'jobs:3' => \$harness_args{jobs},
'nt' => \my $nt,
);
my @tests;
if ($nt) {
$harness_args{files} = [ <nt/*.t> ];
} else {
$harness_args{files} = [ <t/*.t>,<t/*/*.t>, <t/spec/*/*.t> ];
}
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;
}
eval 'use Parrot::Test::Harness %harness_args';