X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/25adc2a87877ad82fdfeb251ef401da2af66dd19..0b9ead6dd2746efbdc7525ba32816b85e9534263:/test/runtest diff --git a/test/runtest b/test/runtest index bdba26fc9..e8fbe4844 100755 --- a/test/runtest +++ b/test/runtest @@ -1,4 +1,6 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl +# We use env, because in some environments of our build farm +# the Perl 5.010 interpreter is only reachable via $PATH ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -14,7 +16,9 @@ ############################################################################### #use strict; -#use 5.010; +use 5.010; +use warnings; + use Errno; use FileHandle; use IO::Socket::INET; @@ -1041,6 +1045,30 @@ RESET_AFTER_EXTRA_LINE_READ: # Spool filesystem free space changes on different systems. s/^((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/; + # Non-TLS builds have different expansions for received_header_text + if (s/(with \$received_protocol)\}\} \$\{if def:tls_cipher \{\(\$tls_cipher\)\n$/$1/) + { + $_ .= ; + s/\s+\}\}(?=\(Exim )/\}\} /; + } + if (/^ condition: def:tls_cipher$/) + { + ; ; ; ; ; ; + ; ; ; ; ; next; + } + + # Not all platforms build with DKIM enabled + next if /^PDKIM >> Body data for hash, canonicalized/; + + # Not all platforms support TCP Fast Open, and the compile omits the check + if (s/\S+ in hosts_try_fastopen\? no \(option unset\)\n$//) + { + $_ .= ; + s/ \.\.\. >>> / ... /; + } + + next if /^(ppppp )?setsockopt FASTOPEN: Protocol not available$/; + # When Exim is checking the size of directories for maildir, it uses # the check_dir_size() function to scan directories. Of course, the order # of the files that are obtained using readdir() varies from system to @@ -1439,6 +1467,9 @@ $munges = { 'stdout' => 's/^\d\d:\d\d:\d\d\s+\d+ //; s/Process \d+ is ready for new message/Process pppp is ready for new message/' }, + + 'timeout_errno' => # actual errno differs Solaris vs. Linux + { 'mainlog' => 's/(host deferral .* errno) <\d+> /$1 /' }, }; @@ -2595,6 +2626,7 @@ else print "Unable to extract exim_user from binary.\n"; print "Check if Exim refused to run; if so, consider:\n"; print " TRUSTED_CONFIG_LIST ALT_CONFIG_PREFIX WHITELIST_D_MACROS\n"; + print "If debug permission denied, are you in the exim group?\n"; die "Failing to get information from binary.\n"; } @@ -3131,8 +3163,15 @@ if ($parm_ipv6 =~ /^[\da-f]/) chomp($temp = `hostname`); 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; +if ($temp =~ /\./) + { + $parm_hostname = $temp; + } +else + { + $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 !~ /\./) @@ -3575,7 +3614,12 @@ closedir(DIR); # contains ****. We open input from the terminal so that we can read responses # to prompts. -open(T, "/dev/tty") || tests_exit(-1, "Failed to open /dev/tty: $!"); +if (not $force_continue) { + # runtest needs to interact if we're not in continue + # mode. It does so by communicate to /dev/tty + open(T, "/dev/tty") or tests_exit(-1, "Failed to open /dev/tty: $!"); +} + print "\nPress RETURN to run the tests: "; $_ = $force_continue ? "c" : ;