X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/f2259efecaf2978bc2baf9b7d9c012e3d01daea0..5930166b443390a522f210c2e60ec447a7dbd080:/test/runtest diff --git a/test/runtest b/test/runtest index edaec6b25..8628ff299 100755 --- a/test/runtest +++ b/test/runtest @@ -18,7 +18,6 @@ #use strict; use v5.10.1; use warnings; -use if $^V >= v5.19.11, experimental => 'smartmatch'; use Errno; use FileHandle; @@ -1074,7 +1073,18 @@ RESET_AFTER_EXTRA_LINE_READ: s/250-AUTH ANONYMOUS PLAIN SCRAM-SHA-1\K SCRAM-SHA-256//; # mailq times change with when the run is done, vs. static-source spoolfiles - s/\s*\d*[hd](?= 317 [0-9A-Za-z\-]{23} )/DDd/; + s/\s*\d*[hd](?= 317 (?:[-0-9A-Za-z]{23}|[-0-9A-Za-z]{16}) )/DDd/; + # mailq sizes change with caller running the test + s/\s[01]m [34]\d\d(?= (?:[-0-9A-Za-z]{23}|[-0-9A-Za-z]{16}) )/ 1m 396/; + + # Not all builds include EXPERIMENTAL_DSN_INFO (1 of 2) + if (/^X-Exim-Diagnostic:/) + { + while () { + last if (/^$/ || !/^\s/); + } + goto RESET_AFTER_EXTRA_LINE_READ; + } } # ======== stderr ======== @@ -1631,6 +1641,15 @@ RESET_AFTER_EXTRA_LINE_READ: ; ; } + + # Not all builds include EXPERIMENTAL_DSN_INFO (2 of 2) + if (/^X-Exim-Diagnostic:/) + { + while () { + last if (/^$/ || !/^\s/); + } + goto RESET_AFTER_EXTRA_LINE_READ; + } } # ======== All files other than stderr ======== @@ -3382,6 +3401,7 @@ GetOptions( print "Exim binary is `$parm_exim'\n" if defined $parm_exim; +my %wanted; my @wanted = sort numerically uniq @tests_wanted ? @tests_wanted : (), @range_wanted ? $range_wanted[0] .. $range_wanted[1] : (), @@ -3390,6 +3410,7 @@ my @wanted = sort numerically uniq 0+$ARGV[0]..0+$ARGV[1] # add 0 to cope with test numbers starting with zero : (); @wanted = 1..TEST_TOP if not @wanted; +map { $wanted{sprintf("%04d",$_)}= $_; } @wanted; ################################################## # Check for sudo access to root # @@ -4202,7 +4223,8 @@ DIR: for (my $i = 0; $i < @test_dirs; $i++) # We want the tests from this subdirectory, provided they are in the # range that was selected. - @testlist = grep { $_ ~~ @wanted } grep { /^\d+(?:\.\d+)?$/ } map { basename $_ } glob "scripts/$testdir/*"; + undef @testlist; + map { push @testlist, $_ if exists $wanted{$_} } grep { /^\d+(?:\.\d+)?$/ } map { basename $_ } glob "scripts/$testdir/*"; tests_exit(-1, "Failed to read test scripts from `scripts/$testdir/*': $!") if not @testlist;