nimbus-eth1/hive_integration/nodocker/rpc/rpc_sim.nim

34 lines
768 B
Nim
Raw Normal View History

2021-11-14 07:52:22 +00: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 08:42:01 +00:00
std/[times],
chronos,
"."/[rpc_tests, test_env],
2022-04-20 07:57:50 +00:00
../sim_utils
2021-11-14 07:52:22 +00:00
proc runRpcTest() =
2022-04-20 07:57:50 +00:00
var stat: SimStat
let start = getTime()
for x in testList:
try:
2022-05-31 08:42:01 +00:00
let env = setupEnv()
let status = waitFor x.run(env)
env.stopEnv()
2022-04-20 07:57:50 +00: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 07:52:22 +00:00
2022-05-31 08:42:01 +00:00
runRpcTest()