testament :show duration also for failed tests; improve tshould_not_work; mitigate #17946 tchannels timeouts (#17947)
* refs #17946; refactor testament test summary, show test duration for failures; increase timeout tchannels * revert workarounds from https://github.com/nim-lang/Nim/pull/16698 and add allowPrefixMatch optional param to greedyOrderedSubsetLines * add test * workaround for yet another testament bug
This commit is contained in:
parent
eba1c3fd24
commit
4e0f38fbb1
21 changed files with 64 additions and 39 deletions
|
|
@ -288,16 +288,18 @@ proc addResult(r: var TResults, test: TTest, target: TTarget,
|
|||
expected = expected,
|
||||
given = given)
|
||||
r.data.addf("$#\t$#\t$#\t$#", name, expected, given, $success)
|
||||
template dispNonSkipped(color, outcome) =
|
||||
maybeStyledEcho color, outcome, fgCyan, test.debugInfo, alignLeft(name, 60), fgBlue, " (", durationStr, " sec)"
|
||||
template disp(msg) =
|
||||
maybeStyledEcho styleDim, fgYellow, msg & ' ', styleBright, fgCyan, name
|
||||
if success == reSuccess:
|
||||
maybeStyledEcho fgGreen, "PASS: ", fgCyan, test.debugInfo, alignLeft(name, 60), fgBlue, " (", durationStr, " sec)"
|
||||
dispNonSkipped(fgGreen, "PASS: ")
|
||||
elif success == reDisabled:
|
||||
if test.spec.inCurrentBatch: disp("SKIP:")
|
||||
else: disp("NOTINBATCH:")
|
||||
elif success == reJoined: disp("JOINED:")
|
||||
else:
|
||||
maybeStyledEcho styleBright, fgRed, failString, fgCyan, name
|
||||
dispNonSkipped(fgRed, failString)
|
||||
maybeStyledEcho styleBright, fgCyan, "Test \"", test.name, "\"", " in category \"", test.cat.string, "\""
|
||||
maybeStyledEcho styleBright, fgRed, "Failure: ", $success
|
||||
if success in {reBuildFailed, reNimcCrash, reInstallFailed}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue