Gitweb:
http://git.exim.org/exim.git/commitdiff/a0ff7619b817834074aadbd45104ba5197008713
Commit: a0ff7619b817834074aadbd45104ba5197008713
Parent: 4b1450820a2a2c54f9c5265b094a023ba80bd834
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Nov 26 17:40:00 2014 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Wed Nov 26 17:40:00 2014 +0000
Testsuite: sort output of retry DB dumps
Different systems will have dump output in different order
so to tidy up the Solaris runs, sort pairs of lines by the
leading "word".
---
test/runtest | 41 ++++++++++++++++++++++++++++++++---------
test/stdout/0099 | 4 ++--
test/stdout/0195 | 16 ++++++++--------
test/stdout/0264 | 4 ++--
4 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/test/runtest b/test/runtest
index 0eda52d..9fd8188 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1666,19 +1666,42 @@ if (/^dump\s+(\S+)/)
my(@temp);
print ">> ./eximdir/exim_dumpdb $parm_cwd/spool $which\n" if $debug;
open(IN, "./eximdir/exim_dumpdb $parm_cwd/spool $which |");
- @temp = <IN>;
- close(IN);
- if ($which eq "callout")
+ open(OUT, ">>test-stdout");
+ print OUT "+++++++++++++++++++++++++++\n";
+
+ if ($which eq "retry")
{
+ $/ = "\n ";
+ @temp = <IN>;
+ $/ = "\n";
+
@temp = sort {
- my($aa) = substr $a, 21;
- my($bb) = substr $b, 21;
- return $aa cmp $bb;
+ my($aa) = split(' ', $a);
+ my($bb) = split(' ', $b);
+ return $aa cmp $bb;
} @temp;
+
+ foreach $item (@temp)
+ {
+ $item =~ s/^\s*(.*)\n(.*)\n?\s*$/\1\n\2/m;
+ print OUT " $item\n";
+ }
}
- open(OUT, ">>test-stdout");
- print OUT "+++++++++++++++++++++++++++\n";
- print OUT @temp;
+ else
+ {
+ @temp = <IN>;
+ if ($which eq "callout")
+ {
+ @temp = sort {
+ my($aa) = substr $a, 21;
+ my($bb) = substr $b, 21;
+ return $aa cmp $bb;
+ } @temp;
+ }
+ print OUT @temp;
+ }
+
+ close(IN);
close(OUT);
return 1;
}
diff --git a/test/stdout/0099 b/test/stdout/0099
index e9272ba..a1b59f9 100644
--- a/test/stdout/0099
+++ b/test/stdout/0099
@@ -16,10 +16,10 @@ first failed = time last try = time2 next try = time2 + 900
first failed = time last try = time2 next try = time2 + 900
T:localhost.test.ex:::1:999 dd 65 Connection refused
first failed = time last try = time2 next try = time2 + 900
- T:thishost.test.ex:999 dd 65 Connection refused
-first failed = time last try = time2 next try = time2 + 900
T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused
first failed = time last try = time2 next try = time2 + 900
+ T:thishost.test.ex:999 dd 65 Connection refused
+first failed = time last try = time2 next try = time2 + 900
Retry rule: *.star.ex * F,3d,10m;
Retry rule: lsearch*@;TESTSUITE/aux-fixed/0099.rlist * F,1d,3m;
Retry rule: !*.not.ex * F,2d,15m;
diff --git a/test/stdout/0195 b/test/stdout/0195
index 991c273..4059a23 100644
--- a/test/stdout/0195
+++ b/test/stdout/0195
@@ -1,24 +1,24 @@
+++++++++++++++++++++++++++
R:userx@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
- R:userz@??? -1 0 forcibly deferred
-first failed = time last try = time2 next try = time2 + 10
R:usery@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
+ R:userz@??? -1 0 forcibly deferred
+first failed = time last try = time2 next try = time2 + 10
+++++++++++++++++++++++++++
R:userx@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
- R:userz@??? -1 0 forcibly deferred
-first failed = time last try = time2 next try = time2 + 10
R:usery@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
+ R:userz@??? -1 0 forcibly deferred
+first failed = time last try = time2 next try = time2 + 10
+++++++++++++++++++++++++++
R:userx@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
- R:userz@??? -1 0 forcibly deferred
-first failed = time last try = time2 next try = time2 + 10
R:usery@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
+ R:userz@??? -1 0 forcibly deferred
+first failed = time last try = time2 next try = time2 + 10
+++++++++++++++++++++++++++
R:userx@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
@@ -27,7 +27,7 @@ first failed = time last try = time2 next try = time2 + 10
+++++++++++++++++++++++++++
R:userx@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
- R:userz@??? -1 0 forcibly deferred
-first failed = time last try = time2 next try = time2 + 10
R:usery@??? -1 0 forcibly deferred
first failed = time last try = time2 next try = time2 + 10
+ R:userz@??? -1 0 forcibly deferred
+first failed = time last try = time2 next try = time2 + 10
diff --git a/test/stdout/0264 b/test/stdout/0264
index a6c9f39..48b789e 100644
--- a/test/stdout/0264
+++ b/test/stdout/0264
@@ -2,10 +2,10 @@
T:userx@??? -22 xxxx mailbox is full (MTA-imposed quota exceeded while writing to TESTSUITE/test-mail/userx)
first failed = time last try = time2 next try = time2 + 600
+++++++++++++++++++++++++++
- T:userx@??? -22 xxxx mailbox is full (MTA-imposed quota exceeded while writing to TESTSUITE/test-mail/userx)
-first failed = time last try = time2 next try = time2 + 600
T:test.ex -22 xxxx mailbox is full (MTA-imposed quota exceeded while writing to TESTSUITE/test-mail/notuser)
first failed = time last try = time2 next try = time2 + 1200
+ T:userx@??? -22 xxxx mailbox is full (MTA-imposed quota exceeded while writing to TESTSUITE/test-mail/userx)
+first failed = time last try = time2 next try = time2 + 600
Message 10HmaX-0005vi-00 has been removed
Message 10HmbA-0005vi-00 has been removed
Message 10HmbB-0005vi-00 has been removed