#! perl
# Copyright (C) 2008, The Perl Foundation.
# $Id: /mirror/trunk/compilers/pirc/t/harness 32770 2008-11-17T00:03:52.539381Z chromatic  $

use strict;
use warnings;

use lib '../../lib';

use Test::Harness;

my @tests = @ARGV ? @ARGV : <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 );
}
