X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/562a0e6f53f497710939fd7b4d16dd936919245c..10523f8f79fa7e0248c7b774ad77d4e1e84b5621:/test/runtest diff --git a/test/runtest b/test/runtest index b2f5d0775..4aa7b864f 100755 --- a/test/runtest +++ b/test/runtest @@ -61,6 +61,7 @@ my $more = 'less -XF'; my $optargs = ''; my $save_output = 0; my $server_opts = ''; +my $slow = 0; my $valgrind = 0; my $have_ipv4 = 1; @@ -800,7 +801,10 @@ RESET_AFTER_EXTRA_LINE_READ: # numbers, or handle specific bad conditions in different ways, leading to # different wording in the error messages, so we cannot compare them. - s/(TLS error on connection (?:from .* )?\(SSL_\w+\): error:)(.*)/$1 <>/; +#XXX This loses any trailing "deliving unencypted to" which is unfortunate +# but I can't work out how to deal with that. + s/(TLS session: \(SSL_\w+\): error:)(.*)(?!: delivering)/$1 <>/; + s/(TLS error on connection from .* \(SSL_\w+\): error:)(.*)/$1 <>/; next if /SSL verify error: depth=0 error=certificate not trusted/; # ======== Maildir things ======== @@ -1274,8 +1278,8 @@ if (! -e $sf_current) log_failure($log_failed_filename, $testno, $rf); log_test($log_summary_filename, $testno, 'F') if ($force_continue); } - return 1 if /^c$/i; - last if (/^s$/); + return 1 if /^c$/i && $rf !~ /paniclog/ && $rsf !~ /paniclog/; + last if (/^[sc]$/); } foreach $f ($rf, $rsf) @@ -2547,6 +2551,7 @@ while (@ARGV > 0 && $ARGV[0] =~ /^-/) if ($arg eq "-NOIPV4") { $have_ipv4 = 0; next; } if ($arg eq "-NOIPV6") { $have_ipv6 = 0; next; } if ($arg eq "-KEEP") { $save_output = 1; next; } + if ($arg eq "-SLOW") { $slow = 1; next; } if ($arg eq "-VALGRIND") { $valgrind = 1; next; } if ($arg =~ /^-FLAVOU?R$/) { $flavour = shift; next; } } @@ -3848,13 +3853,14 @@ foreach $test (@test_list) # command was run and waited for, and 3 if a command # was run and not waited for (usually a daemon or server startup). + $0 = "[runtest $testno]"; + $ENV{EXIM_TEST_NUMBER} = $testno; + my($commandname) = ''; my($expectrc) = 0; my($rc, $run_extra) = run_command($testno, \$subtestno, \$expectrc, \$commandname, $TEST_STATE); my($cmdrc) = $?; - $0 = "[runtest $testno]"; - if ($debug) { print ">> rc=$rc cmdrc=$cmdrc\n"; if (defined $run_extra) { @@ -3994,6 +4000,7 @@ foreach $test (@test_list) if ($docheck) { + sleep 1 if $slow; my $rc = check_output($TEST_STATE->{munge}); log_test($log_summary_filename, $testno, 'P') if ($rc == 0); if ($rc < 2)