X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/d63a9563033c690d8b7f572780b332fa9620ef3b..c039ce6150634eb51a120406b5b7784823430eb5:/test/runtest diff --git a/test/runtest b/test/runtest index 71d4434f1..7fe0e5dae 100755 --- a/test/runtest +++ b/test/runtest @@ -14,7 +14,7 @@ ############################################################################### #use strict; -use 5.010; +#use 5.010; use Errno; use FileHandle; use Socket; @@ -762,6 +762,10 @@ RESET_AFTER_EXTRA_LINE_READ: s/Delivered\s+\d+/Delivered nnn/; + # ======== Values in spool space failure message ======== + s/space=\d+ inodes=[+-]?\d+/space=xxxxx inodes=xxxxx/; + + # ======== Filter sizes ======== # The sizes of filter files may vary because of the substitution of local # filenames, logins, etc. @@ -2562,6 +2566,17 @@ open(EXIMINFO, "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd " . die "** Cannot run $parm_exim: $!\n"; while() { + if (my ($version) = /^Exim version (\S+)/) { + my $git = `git describe --dirty=-XX --match 'exim-4*'`; + if (defined $git and $? == 0) { + chomp $git; + $version =~ s/^\d+\K\./_/; + $git =~ s/^exim-//i; + $git =~ s/.*-\Kg([[:xdigit:]]+(?:-XX)?)/$1/; + print "\n*** Version mismatch (Exim: $version vs. GIT: $git). ***\n\n" + if not $version eq $git; + } + } $parm_eximuser = $1 if /^exim_user = (.*)$/; $parm_eximgroup = $1 if /^exim_group = (.*)$/; $parm_trusted_config_list = $1 if /^TRUSTED_CONFIG_LIST:.*?"(.*?)"$/; @@ -3045,8 +3060,8 @@ close(IFCONFIG); # Use private IP addresses if there are no public ones. -$parm_ipv4 //= '172.10.10.1'; -$parm_ipv6 //= 'fd0a:c2ea:abfa::1'; +$parm_ipv4 = '172.10.10.1' if not defined $parm_ipv4; +$parm_ipv6 = 'fd0a:c2ea:abfa::1' if not defined $parm_ipv6; # If either type of IP address is missing, we need to set the value to # something other than empty, because that wrecks the substitutions. The value @@ -3120,8 +3135,9 @@ if ($parm_ipv6 =~ /^[\da-f]/) # Find the host name, fully qualified. chomp($temp = `hostname`); -$parm_hostname = (gethostbyname($temp))[0] // $temp; -$parm_hostname = "no.host.name.found" if $parm_hostname eq ""; +die "'hostname' didn't return anything\n" unless defined $temp and length $temp; +$parm_hostname = (gethostbyname($temp))[0]; +$parm_hostname = "no.host.name.found" unless defined $parm_hostname and length $parm_hostname; print "Hostname is $parm_hostname\n"; if ($parm_hostname !~ /\./)