#! perl
# Copyright (C) 2008, Parrot Foundation.
# $Id: harness 43593 2010-01-26 02:39:50Z jkeenan $

use strict;
use warnings;

use lib qw(lib);

use Test::Harness;

my @tests = @ARGV ? @ARGV : <compilers/pirc/t/*.t>;

eval { require TAP::Harness };
if ($@) {
    Test::Harness::runtests( @tests );
    exit;
}
else {
    my $harness = TAP::Harness->new({
        verbosity  => $ENV{HARNESS_VERBOSE},
        merge      => 0,
        jobs       => $ENV{TEST_JOBS} || 1,
        directives => 1,
    });

    my $results = $harness->runtests(@tests);
    exit ( $results->all_passed() ? 0 : 1 );
}
