2023-11-01 03:32:09 +00:00
|
|
|
# Nimbus
|
2024-04-17 10:31:37 +00:00
|
|
|
# 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.
|
|
|
|
|
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-11-03 02:24:51 +00:00
|
|
|
result.add wdTestList
|
|
|
|
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()
|