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",
|
2019-03-11 09:22:06 +00:00
|
|
|
"chronicles",
|
2019-07-07 09:55:17 +00:00
|
|
|
"stew",
|
2020-08-28 04:13:16 +00:00
|
|
|
"nat_traversal",
|
2020-04-27 13:16:11 +00:00
|
|
|
"metrics",
|
2020-06-02 15:21:50 +00:00
|
|
|
"sqlite3_abi",
|
2020-06-12 14:19:58 +00:00
|
|
|
"confutils",
|
|
|
|
"testutils"
|
2019-02-05 10:32:22 +00:00
|
|
|
|
2019-03-25 21:22:02 +00:00
|
|
|
proc runTest(path: string) =
|
|
|
|
echo "\nRunning: ", path
|
2020-04-18 08:17:59 +00:00
|
|
|
exec "nim c -r -d:release -d:chronicles_log_level=ERROR --verbosity:0 --hints:off " & path
|
2019-03-25 21:22:02 +00:00
|
|
|
rmFile path
|
2019-02-05 10:10:36 +00:00
|
|
|
|
2019-03-25 21:22:02 +00:00
|
|
|
proc runKeyfileTests() =
|
2020-04-27 13:16:11 +00:00
|
|
|
runTest("tests/keyfile/all_tests")
|
2019-02-15 14:46:44 +00:00
|
|
|
|
|
|
|
task test_keyfile, "run keyfile tests":
|
2019-03-25 21:22:02 +00:00
|
|
|
runKeyfileTests()
|
|
|
|
|
|
|
|
proc runKeysTests() =
|
2020-04-27 13:16:11 +00:00
|
|
|
runTest("tests/keys/all_tests")
|
2019-02-15 14:46:44 +00:00
|
|
|
|
|
|
|
task test_keys, "run keys tests":
|
2019-03-25 21:22:02 +00:00
|
|
|
runKeysTests()
|
|
|
|
|
|
|
|
proc runP2pTests() =
|
|
|
|
for filename in [
|
|
|
|
"les/test_flow_control",
|
|
|
|
"test_auth",
|
|
|
|
"test_crypt",
|
|
|
|
"test_discovery",
|
|
|
|
"test_ecies",
|
|
|
|
"test_enode",
|
2019-10-22 13:14:14 +00:00
|
|
|
"test_rlpx_thunk",
|
2019-03-25 21:22:02 +00:00
|
|
|
"test_shh",
|
2019-11-19 13:08:20 +00:00
|
|
|
"test_shh_config",
|
2019-03-25 21:22:02 +00:00
|
|
|
"test_shh_connect",
|
2019-04-11 13:08:32 +00:00
|
|
|
"test_protocol_handlers",
|
2019-12-10 18:34:57 +00:00
|
|
|
"test_enr",
|
2020-07-12 21:53:27 +00:00
|
|
|
"test_hkdf",
|
2020-09-10 12:49:48 +00:00
|
|
|
"test_lru",
|
2020-02-17 17:04:29 +00:00
|
|
|
"test_discoveryv5",
|
2020-11-13 11:33:07 +00:00
|
|
|
"test_discoveryv5_encoding",
|
2020-06-17 11:51:30 +00:00
|
|
|
"test_routing_table"
|
2019-03-25 21:22:02 +00:00
|
|
|
]:
|
|
|
|
runTest("tests/p2p/" & filename)
|
2019-02-15 14:46:44 +00:00
|
|
|
|
|
|
|
task test_p2p, "run p2p tests":
|
2019-03-25 21:22:02 +00:00
|
|
|
runP2pTests()
|
|
|
|
|
|
|
|
proc runRlpTests() =
|
2020-04-18 08:17:59 +00:00
|
|
|
runTest("tests/rlp/all_tests")
|
2019-02-15 14:46:44 +00:00
|
|
|
|
|
|
|
task test_rlp, "run rlp tests":
|
2019-03-25 21:22:02 +00:00
|
|
|
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":
|
2019-03-25 21:22:02 +00:00
|
|
|
runTrieTests()
|
|
|
|
|
2020-04-27 13:16:11 +00:00
|
|
|
proc runDbTests() =
|
|
|
|
runTest("tests/db/all_tests")
|
|
|
|
|
|
|
|
task test_db, "run db tests":
|
|
|
|
runDbTests()
|
|
|
|
|
2019-03-25 21:22:02 +00:00
|
|
|
task test, "run tests":
|
|
|
|
for filename in [
|
|
|
|
"test_bloom",
|
|
|
|
]:
|
|
|
|
runTest("tests/" & filename)
|
|
|
|
|
|
|
|
runKeyfileTests()
|
|
|
|
runKeysTests()
|
|
|
|
runP2pTests()
|
|
|
|
runRlpTests()
|
|
|
|
runTrieTests()
|
2020-04-27 13:16:11 +00:00
|
|
|
runDbTests()
|
2020-07-12 21:53:27 +00:00
|
|
|
|
|
|
|
proc runDiscv5Tests() =
|
|
|
|
for filename in [
|
|
|
|
"test_enr",
|
|
|
|
"test_hkdf",
|
2020-09-10 12:49:48 +00:00
|
|
|
"test_lru",
|
2020-07-12 21:53:27 +00:00
|
|
|
"test_discoveryv5",
|
2020-11-13 11:33:07 +00:00
|
|
|
"test_discoveryv5_encoding",
|
2020-07-12 21:53:27 +00:00
|
|
|
"test_routing_table"
|
|
|
|
]:
|
|
|
|
runTest("tests/p2p/" & filename)
|
|
|
|
|
|
|
|
task test_discv5, "run tests of discovery v5 and its dependencies":
|
|
|
|
runKeysTests()
|
|
|
|
runRlpTests()
|
|
|
|
runDiscv5Tests()
|