Skip to content

Commit

Permalink
refs nim-lang#17946; refactor testament test summary, show test durat…
Browse files Browse the repository at this point in the history
…ion for failures; increase timeout tchannels
  • Loading branch information
timotheecour committed May 6, 2021
1 parent 9b126de commit ebf7168
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions testament/testament.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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}:
Expand Down
2 changes: 1 addition & 1 deletion tests/stdlib/tchannels.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
discard """
timeout: 5.0 # but typically < 1s
timeout: 20.0 # but typically < 1s (in isolation but other tests running in parallel can affect this since based on epochTime)
disabled: "freebsd"
matrix: "--gc:arc --threads:on; --gc:arc --threads:on -d:danger"
"""
Expand Down

0 comments on commit ebf7168

Please sign in to comment.