From: Jeremy Harris Date: Mon, 21 Oct 2019 10:55:28 +0000 (+0100) Subject: Testsuite: munge for non-TLS builds X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/9f6563c0ee45cfb670a38fb97362abd85b60395f Testsuite: munge for non-TLS builds --- diff --git a/test/runtest b/test/runtest index 1fe107d41..58a989fe5 100755 --- a/test/runtest +++ b/test/runtest @@ -1102,6 +1102,17 @@ RESET_AFTER_EXTRA_LINE_READ: next; } + # Non-TLS bulds have a different Recieved: header expansion + s/^((.*)\t}}}}by \$primary_hostname \${if def:received_protocol {with \$received_protocol }})\(Exim \$version_number\)$/$1\${if def:tls_in_cipher_std { tls \$tls_in_cipher_std\n$2\t}}(Exim \$version_number)/; + s/^((\s*).*considering: with \$received_protocol }})\(Exim \$version_number\)$/$1\${if def:tls_in_cipher_std { tls \$tls_in_cipher_std\n$2\t}}(Exim \$version_number)/; + if (/condition: def:tls_in_cipher_std$/) + { + $_= ; $_= ; $_= ; $_= ; + $_= ; $_= ; $_= ; $_= ; + $_= ; $_= ; $_= ; next; + } + + # Skip tls_advertise_hosts and hosts_require_tls checks when the options # are unset, because tls ain't always there. diff --git a/test/stderr/0402 b/test/stderr/0402 index cc5987850..582622196 100644 --- a/test/stderr/0402 +++ b/test/stderr/0402 @@ -110,18 +110,6 @@ Data file written for message 10HmaX-0005vi-00 for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) diff --git a/test/stderr/0544 b/test/stderr/0544 index fa0d1dfe4..94d65fcd3 100644 --- a/test/stderr/0544 +++ b/test/stderr/0544 @@ -75,18 +75,6 @@ admin user for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) diff --git a/test/stderr/5410 b/test/stderr/5410 index 391d5f204..e808be9db 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -211,18 +211,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) @@ -455,18 +443,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) @@ -699,18 +675,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) diff --git a/test/stderr/5420 b/test/stderr/5420 index 5d7aced0e..c335c9e56 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -212,18 +212,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) @@ -456,18 +444,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>) @@ -700,18 +676,6 @@ end of inline ACL: ACCEPT for $received_for}} ├──expanding: with $received_protocol ╰─────result: with local-esmtp - ├──condition: def:tls_in_cipher_std - ├─────result: false - ╭───scanning: tls $tls_in_cipher_std - }}(Exim $version_number) - ${if def:sender_address {(envelope-from <$sender_address>) - }}id $message_exim_id${if def:received_for { - for $received_for}} - ├──expanding: tls $tls_in_cipher_std - - ├─────result: tls - - ╰───skipping: result is not used ├──condition: def:sender_address ├─────result: true ╭considering: (envelope-from <$sender_address>)