nim-eth/eth.nimble

119 lines
2.6 KiB
Plaintext
Raw Normal View History

2019-02-05 10:10:36 +00:00
version = "1.0.0"
author = "Status Research & Development GmbH"
description = "Ethereum Common library"
license = "MIT"
skipDirs = @["tests"]
2020-04-18 05:21:13 +00:00
requires "nim >= 1.2.0",
2019-02-05 10:10:36 +00:00
"nimcrypto",
"stint",
2019-02-05 14:06:13 +00:00
"secp256k1",
2019-02-05 15:54:17 +00:00
"rocksdb",
2019-02-06 18:11:29 +00:00
"chronos",
"chronicles",
2019-07-07 09:55:17 +00:00
"stew",
"nat_traversal",
"metrics",
2020-06-02 15:21:50 +00:00
"sqlite3_abi",
"confutils",
"testutils"
2019-02-05 10:32:22 +00:00
2020-12-23 10:29:34 +00:00
proc runTest(path: string, release: bool = true) =
echo "\nRunning: ", path
2020-12-23 10:29:34 +00:00
let releaseMode = if release: "-d:release" else: ""
exec "nim c -r " & releaseMode &
" -d:chronicles_log_level=ERROR --verbosity:0 --hints:off " & path
rmFile path
2019-02-05 10:10:36 +00:00
proc runKeyfileTests() =
runTest("tests/keyfile/all_tests")
2019-02-15 14:46:44 +00:00
task test_keyfile, "run keyfile tests":
runKeyfileTests()
proc runKeysTests() =
runTest("tests/keys/all_tests")
2019-02-15 14:46:44 +00:00
task test_keys, "run keys tests":
runKeysTests()
proc runP2pTests() =
for filename in [
"les/test_flow_control",
"test_auth",
"test_crypt",
"test_discovery",
"test_ecies",
"test_enode",
"test_rlpx_thunk",
"test_shh",
2019-11-19 13:08:20 +00:00
"test_shh_config",
"test_shh_connect",
"test_protocol_handlers",
2019-12-10 18:34:57 +00:00
"test_enr",
"test_hkdf",
"test_lru",
2020-02-17 17:04:29 +00:00
"test_discoveryv5",
2020-11-13 11:33:07 +00:00
"test_discoveryv5_encoding",
"test_routing_table"
]:
runTest("tests/p2p/" & filename)
2019-02-15 14:46:44 +00:00
task test_p2p, "run p2p tests":
runP2pTests()
proc runRlpTests() =
2020-12-23 10:29:34 +00:00
# workaround for github action CI
# mysterious crash on windows-2019 64bit mode
# cannot reproduce locally on windows-2019
# running in virtualbox
let releaseMode = if existsEnv"PLATFORM":
getEnv"PLATFORM" != "windows-amd64"
else: true
runTest("tests/rlp/all_tests", releaseMode)
2019-02-15 14:46:44 +00:00
task test_rlp, "run rlp tests":
runRlpTests()
proc runTrieTests() =
2020-04-18 08:17:59 +00:00
runTest("tests/trie/all_tests")
2019-02-15 14:46:44 +00:00
task test_trie, "run trie tests":
runTrieTests()
proc runDbTests() =
runTest("tests/db/all_tests")
task test_db, "run db tests":
runDbTests()
task test, "run tests":
for filename in [
"test_bloom",
]:
runTest("tests/" & filename)
runKeyfileTests()
runKeysTests()
runP2pTests()
runRlpTests()
runTrieTests()
runDbTests()
proc runDiscv5Tests() =
for filename in [
"test_enr",
"test_hkdf",
"test_lru",
"test_discoveryv5",
2020-11-13 11:33:07 +00:00
"test_discoveryv5_encoding",
"test_routing_table"
]:
runTest("tests/p2p/" & filename)
task test_discv5, "run tests of discovery v5 and its dependencies":
runKeysTests()
runRlpTests()
runDiscv5Tests()