2022-04-11 10:00:39 +00:00
|
|
|
import
|
2022-07-18 04:34:42 +00:00
|
|
|
"."/[types, test_env, engine_tests, auths_tests],
|
2022-04-20 07:57:50 +00:00
|
|
|
../sim_utils
|
2022-04-11 10:00:39 +00:00
|
|
|
|
2022-07-18 04:34:42 +00:00
|
|
|
proc combineTests(): seq[TestSpec] =
|
|
|
|
result = @engineTestList
|
|
|
|
result.add @authTestList
|
|
|
|
|
|
|
|
const testList = combineTests()
|
|
|
|
|
2022-04-11 10:00:39 +00:00
|
|
|
proc main() =
|
2022-04-20 07:57:50 +00:00
|
|
|
var stat: SimStat
|
|
|
|
let start = getTime()
|
|
|
|
|
2022-07-18 04:34:42 +00:00
|
|
|
for x in testList:
|
|
|
|
var t = setupELClient(x.chainFile, x.enableAuth)
|
2022-04-20 07:57:50 +00:00
|
|
|
t.setRealTTD(x.ttd)
|
2022-06-27 13:18:54 +00:00
|
|
|
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
|
2022-04-11 10:00:39 +00:00
|
|
|
|
|
|
|
main()
|