#! /usr/bin/perl -w
-# $Cambridge: exim/test/runtest,v 1.6 2006/03/17 16:51:45 ph10 Exp $
+# $Cambridge: exim/test/runtest,v 1.10 2006/04/28 13:46:36 ph10 Exp $
###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
# Start by initializing some global variables
-$testversion = "4.61 (06-Feb-06)";
+$testversion = "4.62 (20-Apr-06)";
$cf = "bin/cf";
$cr = "\r";
s/host\s\Q$parm_ipv6\E\s\[\Q$parm_ipv6\E\]/host ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6]/;
s/\b\Q$parm_ipv4\E\b/ip4.ip4.ip4.ip4/g;
s/\b\Q$parm_ipv6\E\b/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g;
+ s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g;
+ s/\b\Q$parm_ipv6r\E\b/ip6-reverse/g;
# ======== Test network IP addresses ========
s/\b\d+\.H\d+P\d+\b/dddddddddd.HddddddPddddd/;
# Maildirsize data
- if (/^\d+S,\d+C\s*$/)
+ while (/^\d+S,\d+C\s*$/)
{
print MUNGED;
while (<IN>)
}
last if !defined $_;
}
+ last if !defined $_;
# ======== Output from the "fd" program about open descriptors ========
print "IPv4 address is $parm_ipv4\n";
print "IPv6 address is $parm_ipv6\n";
+# For munging test output, we need the reversed IP addresses.
+
+$parm_ipv4r = ($parm_ipv4 !~ /^\d/)? "" :
+ join(".", reverse(split /\./, $parm_ipv4));
+
+$parm_ipv6r = "";
+if ($parm_ipv6 =~ /^[\da-f]/)
+ {
+ my(@comps) = split /:/, $parm_ipv6;
+ my(@nibbles);
+ foreach $comp (@comps)
+ {
+ push @nibbles, sprintf("%lx", hex($comp) >> 8);
+ push @nibbles, sprintf("%lx", hex($comp) & 0xff);
+ }
+ $parm_ipv6r = join(".", reverse(@nibbles));
+ }
+
# Find the host name, fully qualified.
chomp($temp = `hostname`);
@test_dirs = sort readdir(DIR);
closedir(DIR);
+# Remove . and .. and CVS from the list.
+
+for ($i = 0; $i < @test_dirs; $i++)
+ {
+ my($d) = $test_dirs[$i];
+ if ($d eq "." || $d eq ".." || $d eq "CVS")
+ {
+ splice @test_dirs, $i, 1;
+ $i--;
+ }
+ }
+
+# Scan for relevant tests
+
for ($i = 0; $i < @test_dirs; $i++)
{
my($testdir) = $test_dirs[$i];
my($wantthis) = 1;
- next if $testdir eq "." || $testdir eq "..";
print ">>Checking $testdir\n" if $debug;
# Skip this directory if the first test is equal or greater than the first