#!perl
# Copyright (C) 2005, Parrot Foundation.
# $Id: harness 37201 2009-03-08 12:07:48Z fperrad $

use strict;
use warnings;
use Test::Harness;
use File::Spec;


my @files;

# Per Leo on 18APR2005, run the test suite with --gc-debug

if ($ENV{TEST_PROG_ARGS} && $ENV{TEST_PROG_ARGS} !~ /\b--gc-debug\b/) {
  $ENV{TEST_PROG_ARGS} .= " --gc-debug"; 
}

if (@ARGV) {
    # Someone specified tests for me to run.
    @files = grep {-f $_} @ARGV
} else {
    # Called with no args, run the full suite.
    @files = glob( File::Spec->catfile( "t", "*.t" ) );
}

exit unless @files;
runtests(@files);
