2005-10-01 12:35:55 +00:00
|
|
|
#! /usr/bin/env perl
|
2005-02-27 22:01:13 +00:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
2006-10-05 00:09:51 +00:00
|
|
|
use Test::Harness qw(&runtests $verbose);
|
2008-08-02 16:24:33 +00:00
|
|
|
$verbose = (defined $ENV{'VERBOSE'} ? $ENV{'VERBOSE'} : 0);
|
|
|
|
my $tests = (defined $ENV{'TESTS'} ? $ENV{'TESTS'} : '');
|
2005-02-27 22:01:13 +00:00
|
|
|
|
2005-03-02 11:27:02 +00:00
|
|
|
my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
|
2005-02-27 22:01:13 +00:00
|
|
|
|
2005-03-02 11:27:02 +00:00
|
|
|
opendir DIR, $srcdir;
|
|
|
|
my (@fs, $f);
|
|
|
|
while ($f = readdir(DIR)) {
|
2008-08-02 16:24:33 +00:00
|
|
|
if ($f =~ /^(.*)\.t$/) {
|
|
|
|
next if ($tests ne '' and $tests !~ /(^|\s+)$1(\s+|$)/);
|
2005-03-02 11:27:02 +00:00
|
|
|
push @fs, $srcdir.'/'.$f;
|
2005-02-27 22:01:13 +00:00
|
|
|
}
|
|
|
|
}
|
2005-03-02 11:27:02 +00:00
|
|
|
closedir DIR;
|
|
|
|
runtests @fs;
|