[tests] Added env var TESTS to select only a subset of tests

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2279 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.20
Stefan Bühler 2008-08-02 16:24:33 +00:00
parent 5547928112
commit 3cb2c1c39c
1 changed files with 4 additions and 3 deletions

View File

@ -3,17 +3,18 @@
use strict;
use Test::Harness qw(&runtests $verbose);
$verbose = (defined $ENV{'VERBOSE'} ? $ENV{'VERBOSE'} : 0);;
$verbose = (defined $ENV{'VERBOSE'} ? $ENV{'VERBOSE'} : 0);
my $tests = (defined $ENV{'TESTS'} ? $ENV{'TESTS'} : '');
my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
opendir DIR, $srcdir;
my (@fs, $f);
while ($f = readdir(DIR)) {
if ($f =~ /\.t$/) {
if ($f =~ /^(.*)\.t$/) {
next if ($tests ne '' and $tests !~ /(^|\s+)$1(\s+|$)/);
push @fs, $srcdir.'/'.$f;
}
}
closedir DIR;
runtests @fs;