#! perl -w
# $Id: harness 5325 2004-02-21 02:43:09Z allison $

#Blatantly stolen from parrot/t/harness by Mike Lambert

use strict;
use lib '../../lib';
use Test::Harness qw(runtests);

#
# Suck the switches into the TEST_PROG_ARGS evar:
#

use Getopt::Std;
my %opts;
getopts('vgjP', \%opts);
$Test::Harness::verbose = delete $opts{'v'};
$ENV{TEST_PROG_ARGS} = join(' ', map { "-$_" } keys %opts );

# Pass in a list of tests to run on the command line, else run all the tests.
my @tests = @ARGV ? @ARGV : grep !m{^t/parser/}, 
    glob( "t/*/*.t t/*/*/*.t t/*/*/*/*.t" );
runtests(@tests);
