5
unless (-f "$file.pm") {
6
open(CACHE,">$file.pm") or die "Cannot open cache";
7
print CACHE "package Cache;
17
my ($tstdir,$spath,$hostname,$mailhost,$noserver,$nullhost,$quickcheck);
21
("tstdir:s"=>\$tstdir,
23
"hostname:s"=>\$hostname,
24
"mailhost:s"=>\$mailhost,
25
"noserver:s"=>\$noserver,
26
"nullhost:s"=>\$nullhost,
27
"quickcheck"=>\$quickcheck);
29
$spath = "." unless ($spath);
31
unless ($quickcheck) {
33
$hostname = get_option("hostname","host for FTP/HTTP/UDP tests") unless ($hostname);
34
$mailhost = get_option("mailhost","host for SMTP/IMAP/POP tests") unless ($mailhost);
35
$noserver = get_option("noserver","host that rejects above services") unless ($noserver);
36
# This machine should not be locatable from your network. Use IP
37
# private addresses like 10.x.x.x and pick one that does not exist
39
$nullhost = get_option("nullhost","nonexistent IP address (e.g., 10.0.0.0)") unless ($nullhost);
51
$tstdir = `/bin/pwd` unless defined($tstdir);
53
if (defined($tstdir)) {
54
$tstdir =~ s|^(.*)/([^/]+)/?$|$1/$2|;
55
if (-d "../../$2/t") {
56
$tstdir = "../../$2/t";
57
} elsif (-d "$tstdir/t") {
58
$tstdir = "$tstdir/t";
61
die "Could not get PWD from environment\n";
65
$tstdir = './t' unless ($tstdir);
66
opendir(DIR, $tstdir) || die "can't opendir $tstdir: $!";
67
while ($file = readdir(DIR)) {
68
push @dots, "$tstdir/$file" if ($file =~ m/^[^\.]+\.t$/);
75
foreach $test (@dots) {
76
$prog=`basename $test .t`;
81
print "No binary found for $prog\n";
86
#$Test::Harness::verbose=1;