Added test duration output (#6619)
This commit is contained in:
parent
7c3e00d469
commit
1de3938008
1 changed files with 2 additions and 1 deletions
|
|
@ -158,6 +158,7 @@ proc addResult(r: var TResults, test: TTest, target: TTarget,
|
|||
expected, given: string, success: TResultEnum) =
|
||||
let name = test.name.extractFilename & " " & $target & test.options
|
||||
let duration = epochTime() - test.startTime
|
||||
let durationStr = duration.formatFloat(ffDecimal, precision = 8)
|
||||
backend.writeTestResult(name = name,
|
||||
category = test.cat.string,
|
||||
target = $target,
|
||||
|
|
@ -167,7 +168,7 @@ proc addResult(r: var TResults, test: TTest, target: TTarget,
|
|||
given = given)
|
||||
r.data.addf("$#\t$#\t$#\t$#", name, expected, given, $success)
|
||||
if success == reSuccess:
|
||||
styledEcho fgGreen, "PASS: ", fgCyan, name
|
||||
styledEcho fgGreen, "PASS: ", fgCyan, alignLeft(name, 60), fgBlue, " (", durationStr, " secs)"
|
||||
elif success == reIgnored:
|
||||
styledEcho styleDim, fgYellow, "SKIP: ", styleBright, fgCyan, name
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue