Fix HAVE_LOCAL_SCAN build. Bug 2457
[exim.git] / test / runtest
index 558fcf66188dc12618e97da1c0e09b7415a7e546..c78cabf4bd2fdd4f8d79dfdde1bdce64d73990b2 100755 (executable)
@@ -913,6 +913,11 @@ RESET_AFTER_EXTRA_LINE_READ:
   last if !defined $_;
 
 
+  # SRS timestamps and signatures vary by hostname and from run to run
+
+  s/SRS0=....=..=[^=]+=[^@]+\@test.ex/SRS0=ZZZZ=YY=the.local.host.name=CALLER\@test.ex/;
+
+
   # ======== Output from the "fd" program about open descriptors ========
   # The statuses seem to be different on different operating systems, but
   # at least we'll still be checking the number of open fd's.
@@ -1275,6 +1280,10 @@ RESET_AFTER_EXTRA_LINE_READ:
     # TLS resumption is not always supported by the build
     next if /in tls_resumption_hosts\?/;
 
+    # Most builds are without HAVE_LOCAL_SCAN
+    next if /^calling local_scan(); timeout=300$/;
+    next if /^local_scan() returned 0 NULL$/;
+
     # Platform differences in errno strings
     s/  SMTP\(Operation timed out\)<</  SMTP(Connection timed out)<</;
 
@@ -3406,7 +3415,7 @@ open(IFCONFIG, '-|', (grep { -x "$_/ip" } split /:/, $ENV{PATH}) ? 'ip address'
   or die "** Cannot run 'ip address' or 'ifconfig -a'\n";
 while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
   {
-  if (/^(?:[0-9]+: )([^:]+): /) { $ifname = $1; }
+  if (/^(?:[0-9]+: )?([a-z0-9]+): /) { $ifname = $1; }
 
   if (not $parm_ipv4 and /^\s*inet(?:\saddr)?:?\s?(\d+\.\d+\.\d+\.\d+)(?:\/\d+)?\s/i)
     {
@@ -3419,7 +3428,7 @@ while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
 
   if (not $parm_ipv6 and /^\s*inet6(?:\saddr)?:?\s?([abcdef\d:]+)(?:%[^ \/]+)?(?:\/\d+)?/i)
     {
-    next if $1 eq '::' or $1 eq '::1' or $1 =~ /^ff00/i;
+    next if $1 eq '::' or $1 eq '::1' or $1 =~ /^ff00/i or $1 =~ /^fe80::1/i;
     $parm_ipv6 = $1;
     if ($1 =~ /^fe80/i) { $parm_ipv6 .= '%' . $ifname; }
     }