nimbus-eth1/hive_integration/nodocker/engine/engine_sim.nim

32 lines
667 B
Nim
Raw Normal View History

import
"."/[types, test_env, engine_tests, auths_tests],
2022-04-20 07:57:50 +00:00
unittest2,
../sim_utils
proc combineTests(): seq[TestSpec] =
result = @engineTestList
result.add @authTestList
const testList = combineTests()
proc main() =
2022-04-20 07:57:50 +00:00
var stat: SimStat
let start = getTime()
for x in testList:
var t = setupELClient(x.chainFile, x.enableAuth)
2022-04-20 07:57:50 +00:00
t.setRealTTD(x.ttd)
if x.slotsToFinalized != 0:
t.slotsToFinalized(x.slotsToFinalized)
if x.slotsToSafe != 0:
t.slotsToSafe(x.slotsToSafe)
2022-04-20 07:57:50 +00:00
let status = x.run(t)
t.stopELClient()
stat.inc(x.name, status)
let elpd = getTime() - start
print(stat, elpd, "engine")
2022-06-17 00:53:33 +00:00
echo stat
main()