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

57 lines
1.3 KiB
Nim
Raw Normal View History

2023-11-01 03:32:09 +00:00
# Nimbus
# Copyright (c) 2023-2024 Status Research & Development GmbH
2023-11-01 03:32:09 +00:00
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
# http://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
# http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
import
std/times,
chronicles,
2024-05-30 12:54:03 +00:00
results,
./types,
../sim_utils,
../../../nimbus/core/eip4844
import
./engine_tests,
./auths_tests,
2023-08-21 02:08:54 +00:00
./exchange_cap_tests,
./withdrawal_tests,
./cancun_tests
2023-08-21 02:08:54 +00:00
proc combineTests(): seq[TestDesc] =
2023-11-03 02:24:51 +00:00
result.add wdTestList
result.add ecTestList
result.add authTestList
result.add engineTestList
result.add cancunTestList
2023-08-21 02:08:54 +00:00
let
testList = combineTests()
proc main() =
2022-04-20 07:57:50 +00:00
var stat: SimStat
let start = getTime()
let res = loadKzgTrustedSetup()
if res.isErr:
fatal "Cannot load baked in Kzg trusted setup", msg=res.error
quit(QuitFailure)
for x in testList:
2023-08-21 02:08:54 +00:00
let status = if x.run(x.spec):
TestStatus.OK
else:
TestStatus.Failed
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()