File: TEST

package info (click to toggle)
sdf 2.001%2B1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,140 kB
  • sloc: perl: 18,543; sh: 31; makefile: 29
file content (41 lines) | stat: -rwxr-xr-x 940 bytes parent folder | download | duplicates (6)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/local/bin/perl

# This script is run Test::Harness on the tests found under the
# "t" directory.

# First we check if we already are within the "t" directory
unless (-d "general") {
    # try to move into test directory
    chdir "t" or die "Can't chdir: $!";

    # fix all relative library locations
    foreach (@INC) {
	$_ = "../$_" unless m,^/,;
    }
}
# Pick up the library files from the ../blib directory
unshift(@INC, "../../blib/lib", "../../blib/arch");
#print "@INC\n";


use Test::Harness;
$Test::Harness::switches = "";
$Test::Harness::verbose = shift
  if $ARGV[0] =~ /^\d+$/ || $ARGV[0] eq "-v";
#$Test::Harness::verbose = 1;

if (@ARGV) {
    for (@ARGV) {
	if (-d $_) {
	    push(@tests, <$_/*.t>);
	} else {
            $_ .= ".t" unless /\.t$/;
	    push(@tests, $_);
	}
    }
} else {
    @tests = (<general/*.t>, <macro/*.t>, <filter/*.t>);
}

#print STDERR join("|", "tests=", @tests, "\n");
runtests @tests;