File: run-tests.pl

package info (click to toggle)
lighttpd 1.4.35-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 4,972 kB
  • sloc: ansic: 40,272; sh: 11,984; perl: 3,117; yacc: 603; makefile: 483; php: 16
file content (27 lines) | stat: -rwxr-xr-x 624 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env perl

use strict;

use Test::Harness qw(&runtests $verbose);
$verbose = (defined $ENV{'VERBOSE'} ? $ENV{'VERBOSE'} : 0);
my $tests = (defined $ENV{'RUNTESTS'} ? $ENV{'RUNTESTS'} : '');

my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');

opendir DIR, $srcdir;
my (@fs, $f);
while ($f = readdir(DIR)) {
	if ($f =~ /^(.*)\.t$/) {
		next if ($tests ne '' and $tests !~ /(^|\s+)$1(\s+|$)/);
		push @fs, $srcdir.'/'.$f;
	}
}

# avoid indeterminant test on kfreebsd
use Config;
if (index($Config{'archname'}, 'freebsd') != -1) {
	@fs = grep(!/mod-fastcgi.t/, @fs);
}

closedir DIR;
runtests (sort @fs);