X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/93c3f40d578a22c112fd67954528f921dae50a78..fa1c8faf169384bebaa8d172f491574c45ae2aa4:/test/runtest diff --git a/test/runtest b/test/runtest index 1730a9889..24f80d3a4 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; @@ -1075,6 +1074,15 @@ RESET_AFTER_EXTRA_LINE_READ: # mailq times change with when the run is done, vs. static-source spoolfiles s/\s*\d*[hd](?= 317 [0-9A-Za-z\-]{23} )/DDd/; + + # 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 +1639,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 ======== @@ -2639,6 +2656,12 @@ if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ || run_system("$_ >>test-stdout 2>>test-stderr"); return 1; } +if (/^cat2\s/) + { + s/^cat2/cat/; + run_system("$_ 2>&1 >test-stderr"); + return 1; + } @@ -3376,6 +3399,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] : (), @@ -3384,6 +3408,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 # @@ -4196,7 +4221,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;