X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/4af1b6cad6bbf0856e07cc99ab09257be652b819..4c7220eb267fab4dc1de70e4e65298e1448c33d1:/test/runtest diff --git a/test/runtest b/test/runtest index fbc4fc484..7e2dbe8eb 100755 --- a/test/runtest +++ b/test/runtest @@ -680,7 +680,6 @@ RESET_AFTER_EXTRA_LINE_READ: s/^\s+host\s(\S+)\s+(\S+)/ host $1 $2/; s/^\s+(host\s\S+\s\S+)\s+(port=.*)/ host $1 $2/; s/^\s+(host\s\S+\s\S+)\s+(?=MX=)/ $1 /; - s/^\s+host\s.*?\K\s+(ad=\S+)/ $1/; s/host\s\Q$parm_ipv4\E\s\[\Q$parm_ipv4\E\]/host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]/; 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; @@ -1019,6 +1018,9 @@ RESET_AFTER_EXTRA_LINE_READ: @saved = (); } + # remote port numbers vary + s/(Connection request from 127.0.0.1 port) \d{1,5}/$1 sssss/; + # Skip hosts_require_dane checks when the options # are unset, because dane ain't always there. @@ -1379,7 +1381,7 @@ $munges = { 'mainlog' => 's/ X=TLS\S+ / X=TLS_proto_and_cipher /' }, 'debug_pid' => - { 'stderr' => 's/\d{1,5}/ppppp/g' }, + { 'stderr' => 's/(^\s{0,4}|(?<=Process )|(?<=child ))\d{1,5}/ppppp/g' }, }; @@ -2059,12 +2061,12 @@ if (/^client/ || /^(sudo\s+)?perl\b/) # not drop privilege when -C and -D options are present. To run the exim # command as root, we use sudo. -elsif (/^([A-Z_]+=\S+\s+)?(\d+)?\s*(sudo\s+)?exim(_\S+)?\s+(.*)$/) +elsif (/^([A-Z_]+=\S+\s+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+)?\s+(.*)$/) { - $args = $5; + $args = $6; my($envset) = (defined $1)? $1 : ""; - my($sudo) = (defined $3)? "sudo " : ""; - my($special)= (defined $4)? $4 : ""; + my($sudo) = (defined $3)? "sudo " . (defined $4 ? "-u $4 ":"") : ""; + my($special)= (defined $5)? $5 : ""; $wait_time = (defined $2)? $2 : 0; # Return 2 rather than 1 afterwards @@ -2124,7 +2126,6 @@ elsif (/^([A-Z_]+=\S+\s+)?(\d+)?\s*(sudo\s+)?exim(_\S+)?\s+(.*)$/) "-DEXIM_PATH=$parm_cwd/eximdir/exim$special " . "-C $parm_cwd/test-config $args " . ">>test-stdout 2>>test-stderr"; - # If the command is starting an Exim daemon, we run it in the same # way as the "server" command above, that is, we don't want to wait # for the process to finish. That happens when "killdaemon" is obeyed later @@ -2390,7 +2391,7 @@ if ($parm_exim eq "") # directory. Thus, we should choose the highest version of Exim that has # been compiled. - if ($f eq "exim4" || $f eq "exim-snapshot") + if ($f eq "exim4" || $f eq "exim-snapshot" || $f eq 'src') { $srcdir = $f; } else { $srcdir = $f @@ -3736,6 +3737,7 @@ $0 = "[runtest $testno]"; # The script has finished. Check the all the output that was generated. The # function returns 0 if all is well, 1 if we should rerun the test (the files + # function returns 0 if all is well, 1 if we should rerun the test (the files # have been updated). It does not return if the user responds Q to a prompt. if ($retry)