2022-04-11 10:00:39 +00:00
|
|
|
import
|
2023-09-06 09:18:26 +00:00
|
|
|
std/times,
|
2023-10-19 03:28:52 +00:00
|
|
|
chronicles,
|
|
|
|
stew/results,
|
2023-09-06 09:18:26 +00:00
|
|
|
./types,
|
2023-10-19 03:28:52 +00:00
|
|
|
../sim_utils,
|
|
|
|
../../../nimbus/core/eip4844
|
2022-04-11 10:00:39 +00:00
|
|
|
|
2023-08-08 03:44:29 +00:00
|
|
|
import
|
|
|
|
./engine_tests,
|
|
|
|
./auths_tests,
|
2023-08-21 02:08:54 +00:00
|
|
|
./exchange_cap_tests,
|
2023-10-19 03:28:52 +00:00
|
|
|
./withdrawal_tests,
|
|
|
|
./cancun_tests
|
2023-08-08 03:44:29 +00:00
|
|
|
|
2023-08-21 02:08:54 +00:00
|
|
|
proc combineTests(): seq[TestDesc] =
|
2023-09-06 09:18:26 +00:00
|
|
|
result.add wdTestList
|
2023-08-21 02:08:54 +00:00
|
|
|
result.add ecTestList
|
|
|
|
result.add authTestList
|
|
|
|
result.add engineTestList
|
2023-10-19 03:28:52 +00:00
|
|
|
result.add cancunTestList
|
2022-07-18 04:34:42 +00:00
|
|
|
|
2023-08-21 02:08:54 +00:00
|
|
|
let
|
|
|
|
testList = combineTests()
|
2022-07-18 04:34:42 +00:00
|
|
|
|
2022-04-11 10:00:39 +00:00
|
|
|
proc main() =
|
2022-04-20 07:57:50 +00:00
|
|
|
var stat: SimStat
|
|
|
|
let start = getTime()
|
|
|
|
|
2023-10-19 03:28:52 +00:00
|
|
|
let res = loadKzgTrustedSetup()
|
|
|
|
if res.isErr:
|
|
|
|
fatal "Cannot load baked in Kzg trusted setup", msg=res.error
|
|
|
|
quit(QuitFailure)
|
|
|
|
|
2022-07-18 04:34:42 +00:00
|
|
|
for x in testList:
|
2023-08-21 02:08:54 +00:00
|
|
|
let status = if x.run(x.spec):
|
|
|
|
TestStatus.OK
|
|
|
|
else:
|
|
|
|
TestStatus.Failed
|
2023-08-08 03:44:29 +00:00
|
|
|
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
|
2022-04-11 10:00:39 +00:00
|
|
|
|
|
|
|
main()
|