jangko 18587c3abe
use axplicit 127.0.0.1 instead of localhost string
on windows, using "localhost" for rpc test is very slow.
both pyspec_sim and engine_sim will need more than one hour.
while on linux and macos only few minutes.
2023-07-24 21:50:39 +07:00

31 lines
654 B
Nim

import
"."/[types, test_env, engine_tests, auths_tests],
../sim_utils
proc combineTests(): seq[TestSpec] =
result = @engineTestList
result.add @authTestList
const testList = combineTests()
proc main() =
var stat: SimStat
let start = getTime()
for x in testList:
var t = setupELClient(x.chainFile, x.enableAuth)
t.setRealTTD(x.ttd)
if x.slotsToFinalized != 0:
t.slotsToFinalized(x.slotsToFinalized)
if x.slotsToSafe != 0:
t.slotsToSafe(x.slotsToSafe)
let status = x.run(t)
t.stopELClient()
stat.inc(x.name, status)
let elpd = getTime() - start
print(stat, elpd, "engine")
echo stat
main()