34 lines
768 B
Nim
Raw Normal View History

2021-11-14 14:52:22 +07:00
# Nimbus
# Copyright (c) 2021 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
# at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.
import
2022-05-31 15:42:01 +07:00
std/[times],
chronos,
"."/[rpc_tests, test_env],
2022-04-20 14:57:50 +07:00
../sim_utils
2021-11-14 14:52:22 +07:00
proc runRpcTest() =
2022-04-20 14:57:50 +07:00
var stat: SimStat
let start = getTime()
for x in testList:
try:
2022-05-31 15:42:01 +07:00
let env = setupEnv()
let status = waitFor x.run(env)
env.stopEnv()
2022-04-20 14:57:50 +07:00
stat.inc(x.name, status)
except ValueError as ex:
stat.inc(x.name, TestStatus.Failed)
echo ex.msg
let elpd = getTime() - start
print(stat, elpd, "rpc")
2021-11-14 14:52:22 +07:00
2022-05-31 15:42:01 +07:00
runRpcTest()