mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 13:24:21 +00:00
add total count to test helpers
This commit is contained in:
parent
6a24701bbf
commit
83e01994df
@ -173,6 +173,9 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
|
||||
|
||||
let `symbol`: array[Status, string] = ["+", "-", " "]
|
||||
var raw = ""
|
||||
var okCountTotal = 0
|
||||
var failCountTotal = 0
|
||||
var skipCountTotal = 0
|
||||
raw.add(`s` & "\n")
|
||||
raw.add("===\n")
|
||||
for folder, statuses in status:
|
||||
@ -192,7 +195,14 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
|
||||
of Status.Skip: skipCount += 1
|
||||
raw.add("```\n")
|
||||
let sum = okCount + failCount + skipCount
|
||||
okCountTotal += okCount
|
||||
failCountTotal += failCount
|
||||
skipCountTotal += skipCount
|
||||
raw.add("OK: " & $okCount & "/" & $sum & " Fail: " & $failCount & "/" & $sum & " Skip: " & $skipCount & "/" & $sum & "\n")
|
||||
|
||||
let sumTotal = okCountTotal + failCountTotal + skipCountTotal
|
||||
raw.add("\n---TOTAL---\n")
|
||||
raw.add("OK: $1/$4 Fail: $2/$4 Skip: $3/$4\n" % [$okCountTotal, $failCountTotal, $skipCountTotal, $sumTotal])
|
||||
writeFile(`s` & ".md", raw)
|
||||
|
||||
func ethAddressFromHex*(s: string): EthAddress = hexToByteArray(s, result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user