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

42 lines
842 B
Nim
Raw Normal View History

import
"."/[types, test_env],
2022-04-20 07:57:50 +00:00
../sim_utils
import
./engine_tests,
./auths_tests,
./exchange_cap_tests
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)
for x in exchangeCapTestList:
let env = setupELClient(x.conf)
let status = x.run(env)
env.stopELClient()
stat.inc(x.name, status)
2022-04-20 07:57:50 +00:00
let elpd = getTime() - start
print(stat, elpd, "engine")
2022-06-17 00:53:33 +00:00
echo stat
main()