autotest: de-duplicate error reporting paths
This commit is contained in:
parent
373abcef02
commit
2da7951fe0
|
@ -616,24 +616,17 @@ sub test($$$@)
|
||||||
&writecfg(@sfx);
|
&writecfg(@sfx);
|
||||||
|
|
||||||
my ($xc, @ret) = runsync("-J");
|
my ($xc, @ret) = runsync("-J");
|
||||||
if ($xc) {
|
if ($xc || ckchan("slave/.mbsyncstate.new", $tx)) {
|
||||||
print "Input:\n";
|
print "Input:\n";
|
||||||
printchan($sx);
|
printchan($sx);
|
||||||
print "Options:\n";
|
print "Options:\n";
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
||||||
print "Debug output:\n";
|
if (!$xc) {
|
||||||
print @ret;
|
print "Expected result:\n";
|
||||||
exit 1;
|
printchan($tx);
|
||||||
}
|
print "Actual result:\n";
|
||||||
if (ckchan("slave/.mbsyncstate.new", $tx)) {
|
showchan("slave/.mbsyncstate.new");
|
||||||
print "Input:\n";
|
}
|
||||||
printchan($sx);
|
|
||||||
print "Options:\n";
|
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
|
||||||
print "Expected result:\n";
|
|
||||||
printchan($tx);
|
|
||||||
print "Actual result:\n";
|
|
||||||
showchan("slave/.mbsyncstate.new");
|
|
||||||
print "Debug output:\n";
|
print "Debug output:\n";
|
||||||
print @ret;
|
print @ret;
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -644,52 +637,35 @@ sub test($$$@)
|
||||||
my @nj = <FILE>;
|
my @nj = <FILE>;
|
||||||
close FILE;
|
close FILE;
|
||||||
($xc, @ret) = runsync("-0 --no-expunge");
|
($xc, @ret) = runsync("-0 --no-expunge");
|
||||||
if ($xc) {
|
if ($xc || ckstate("slave/.mbsyncstate", @{ $$tx[2] })) {
|
||||||
print "Journal replay failed.\n";
|
print "Journal replay failed.\n";
|
||||||
print "Options:\n";
|
print "Options:\n";
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ], [ \"-0\", \"--no-expunge\" ]\n";
|
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ], [ \"-0\", \"--no-expunge\" ]\n";
|
||||||
print "Old State:\n";
|
print "Old State:\n";
|
||||||
printstate(@{ $$sx[2] });
|
printstate(@{ $$sx[2] });
|
||||||
print "Journal:\n".join("", @nj)."\n";
|
print "Journal:\n".join("", @nj)."\n";
|
||||||
print "Debug output:\n";
|
if (!$xc) {
|
||||||
print @ret;
|
print "Expected New State:\n";
|
||||||
exit 1;
|
printstate(@{ $$tx[2] });
|
||||||
}
|
print "New State:\n";
|
||||||
if (ckstate("slave/.mbsyncstate", @{ $$tx[2] })) {
|
showstate("slave/.mbsyncstate");
|
||||||
print "Journal replay failed.\n";
|
}
|
||||||
print "Options:\n";
|
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ], [ \"-0\", \"--no-expunge\" ]\n";
|
|
||||||
print "Old State:\n";
|
|
||||||
printstate(@{ $$sx[2] });
|
|
||||||
print "Journal:\n".join("", @nj)."\n";
|
|
||||||
print "Expected New State:\n";
|
|
||||||
printstate(@{ $$tx[2] });
|
|
||||||
print "New State:\n";
|
|
||||||
showstate("slave/.mbsyncstate");
|
|
||||||
print "Debug output:\n";
|
print "Debug output:\n";
|
||||||
print @ret;
|
print @ret;
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
($xc, @ret) = runsync("");
|
($xc, @ret) = runsync("");
|
||||||
if ($xc) {
|
if ($xc || ckchan("slave/.mbsyncstate", $tx)) {
|
||||||
print "Idempotence verification run failed.\n";
|
print "Idempotence verification run failed.\n";
|
||||||
print "Input == Expected result:\n";
|
print "Input == Expected result:\n";
|
||||||
printchan($tx);
|
printchan($tx);
|
||||||
print "Options:\n";
|
print "Options:\n";
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
||||||
print "Debug output:\n";
|
if (!$xc) {
|
||||||
print @ret;
|
print "Actual result:\n";
|
||||||
exit 1;
|
showchan("slave/.mbsyncstate");
|
||||||
}
|
}
|
||||||
if (ckchan("slave/.mbsyncstate", $tx)) {
|
|
||||||
print "Idempotence verification run failed.\n";
|
|
||||||
print "Input == Expected result:\n";
|
|
||||||
printchan($tx);
|
|
||||||
print "Options:\n";
|
|
||||||
print " [ ".join(", ", map('"'.qm($_).'"', @sfx))." ]\n";
|
|
||||||
print "Actual result:\n";
|
|
||||||
showchan("slave/.mbsyncstate");
|
|
||||||
print "Debug output:\n";
|
print "Debug output:\n";
|
||||||
print @ret;
|
print @ret;
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user