2019-02-05 12:10:36 +02:00
|
|
|
version = "1.0.0"
|
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "Ethereum Common library"
|
|
|
|
license = "MIT"
|
|
|
|
skipDirs = @["tests"]
|
|
|
|
|
2020-04-18 07:21:13 +02:00
|
|
|
requires "nim >= 1.2.0",
|
2019-02-05 12:10:36 +02:00
|
|
|
"nimcrypto",
|
|
|
|
"stint",
|
2019-02-05 16:06:13 +02:00
|
|
|
"secp256k1",
|
2019-02-05 17:54:17 +02:00
|
|
|
"rocksdb",
|
2019-02-06 19:11:29 +01:00
|
|
|
"chronos",
|
2019-03-11 11:22:06 +02:00
|
|
|
"chronicles",
|
2019-07-07 11:55:17 +02:00
|
|
|
"stew",
|
2019-07-10 02:08:35 +02:00
|
|
|
"nat_traversal",
|
2020-04-27 15:16:11 +02:00
|
|
|
"metrics",
|
2020-06-02 17:21:50 +02:00
|
|
|
"sqlite3_abi",
|
2020-06-12 16:19:58 +02:00
|
|
|
"confutils",
|
|
|
|
"testutils"
|
2019-02-05 12:32:22 +02:00
|
|
|
|
2019-03-25 22:22:02 +01:00
|
|
|
proc runTest(path: string) =
|
|
|
|
echo "\nRunning: ", path
|
2020-04-18 10:17:59 +02:00
|
|
|
exec "nim c -r -d:release -d:chronicles_log_level=ERROR --verbosity:0 --hints:off " & path
|
2019-03-25 22:22:02 +01:00
|
|
|
rmFile path
|
2019-02-05 12:10:36 +02:00
|
|
|
|
2019-03-25 22:22:02 +01:00
|
|
|
proc runKeyfileTests() =
|
2020-04-27 15:16:11 +02:00
|
|
|
runTest("tests/keyfile/all_tests")
|
2019-02-15 15:46:44 +01:00
|
|
|
|
|
|
|
task test_keyfile, "run keyfile tests":
|
2019-03-25 22:22:02 +01:00
|
|
|
runKeyfileTests()
|
|
|
|
|
|
|
|
proc runKeysTests() =
|
2020-04-27 15:16:11 +02:00
|
|
|
runTest("tests/keys/all_tests")
|
2019-02-15 15:46:44 +01:00
|
|
|
|
|
|
|
task test_keys, "run keys tests":
|
2019-03-25 22:22:02 +01:00
|
|
|
runKeysTests()
|
|
|
|
|
|
|
|
proc runP2pTests() =
|
|
|
|
for filename in [
|
|
|
|
"les/test_flow_control",
|
|
|
|
"test_auth",
|
|
|
|
"test_crypt",
|
|
|
|
"test_discovery",
|
|
|
|
"test_ecies",
|
|
|
|
"test_enode",
|
2019-10-22 15:14:14 +02:00
|
|
|
"test_rlpx_thunk",
|
2019-03-25 22:22:02 +01:00
|
|
|
"test_shh",
|
2019-11-19 14:08:20 +01:00
|
|
|
"test_shh_config",
|
2019-03-25 22:22:02 +01:00
|
|
|
"test_shh_connect",
|
2019-04-11 15:08:32 +02:00
|
|
|
"test_protocol_handlers",
|
2019-12-10 20:34:57 +02:00
|
|
|
"test_enr",
|
2020-07-12 23:53:27 +02:00
|
|
|
"test_hkdf",
|
2020-02-17 18:04:29 +01:00
|
|
|
"test_discoveryv5",
|
2020-06-17 13:51:30 +02:00
|
|
|
"test_discv5_encoding",
|
|
|
|
"test_routing_table"
|
2019-03-25 22:22:02 +01:00
|
|
|
]:
|
|
|
|
runTest("tests/p2p/" & filename)
|
2019-02-15 15:46:44 +01:00
|
|
|
|
|
|
|
task test_p2p, "run p2p tests":
|
2019-03-25 22:22:02 +01:00
|
|
|
runP2pTests()
|
|
|
|
|
|
|
|
proc runRlpTests() =
|
2020-04-18 10:17:59 +02:00
|
|
|
runTest("tests/rlp/all_tests")
|
2019-02-15 15:46:44 +01:00
|
|
|
|
|
|
|
task test_rlp, "run rlp tests":
|
2019-03-25 22:22:02 +01:00
|
|
|
runRlpTests()
|
|
|
|
|
|
|
|
proc runTrieTests() =
|
2020-04-18 10:17:59 +02:00
|
|
|
runTest("tests/trie/all_tests")
|
2019-02-15 15:46:44 +01:00
|
|
|
|
|
|
|
task test_trie, "run trie tests":
|
2019-03-25 22:22:02 +01:00
|
|
|
runTrieTests()
|
|
|
|
|
2020-04-27 15:16:11 +02:00
|
|
|
proc runDbTests() =
|
|
|
|
runTest("tests/db/all_tests")
|
|
|
|
|
|
|
|
task test_db, "run db tests":
|
|
|
|
runDbTests()
|
|
|
|
|
2019-03-25 22:22:02 +01:00
|
|
|
task test, "run tests":
|
|
|
|
for filename in [
|
|
|
|
"test_bloom",
|
|
|
|
]:
|
|
|
|
runTest("tests/" & filename)
|
|
|
|
|
|
|
|
runKeyfileTests()
|
|
|
|
runKeysTests()
|
|
|
|
runP2pTests()
|
|
|
|
runRlpTests()
|
|
|
|
runTrieTests()
|
2020-04-27 15:16:11 +02:00
|
|
|
runDbTests()
|
2020-07-12 23:53:27 +02:00
|
|
|
|
|
|
|
proc runDiscv5Tests() =
|
|
|
|
for filename in [
|
|
|
|
"test_enr",
|
|
|
|
"test_hkdf",
|
|
|
|
"test_discoveryv5",
|
|
|
|
"test_discv5_encoding",
|
|
|
|
"test_routing_table"
|
|
|
|
]:
|
|
|
|
runTest("tests/p2p/" & filename)
|
|
|
|
|
|
|
|
task test_discv5, "run tests of discovery v5 and its dependencies":
|
|
|
|
runKeysTests()
|
|
|
|
runRlpTests()
|
|
|
|
runTrieTests() # This probably tests a bit to much for what we use it for.
|
|
|
|
runDiscv5Tests()
|