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"]
|
|
|
|
|
2019-02-05 11:10:23 +00:00
|
|
|
requires "nim >= 0.19.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",
|
2019-04-17 01:35:45 +00:00
|
|
|
"result",
|
2019-07-10 00:08:35 +00:00
|
|
|
"nat_traversal",
|
2019-09-06 02:55:30 +00:00
|
|
|
"metrics"
|
2019-02-05 10:32:22 +00:00
|
|
|
|
2019-03-25 21:22:02 +00:00
|
|
|
proc runTest(path: string) =
|
|
|
|
echo "\nRunning: ", path
|
|
|
|
exec "nim c -r -d:release -d:chronicles_log_level=ERROR --verbosity:0 --hints:off --warnings:off " & path
|
|
|
|
rmFile path
|
2019-02-05 10:10:36 +00:00
|
|
|
|
2019-03-25 21:22:02 +00:00
|
|
|
proc runKeyfileTests() =
|
|
|
|
for filename in [
|
|
|
|
"test_keyfile",
|
|
|
|
"test_uuid",
|
|
|
|
]:
|
|
|
|
runTest("tests/keyfile/" & filename)
|
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() =
|
|
|
|
for filename in [
|
|
|
|
"test_keys",
|
|
|
|
]:
|
|
|
|
runTest("tests/keys/" & filename)
|
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-11-19 16:22:35 +00:00
|
|
|
"test_waku_bridge",
|
2019-04-11 13:08:32 +00:00
|
|
|
"test_protocol_handlers",
|
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() =
|
|
|
|
for filename in [
|
|
|
|
"test_api_usage",
|
|
|
|
"test_json_suite",
|
|
|
|
"test_object_serialization",
|
|
|
|
]:
|
|
|
|
runTest("tests/rlp/" & filename)
|
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() =
|
|
|
|
for filename in [
|
|
|
|
"test_binaries_utils",
|
|
|
|
"test_bin_trie",
|
|
|
|
"test_branches_utils",
|
|
|
|
"test_caching_db_backend",
|
|
|
|
"test_examples",
|
|
|
|
"test_hexary_trie",
|
|
|
|
"test_json_suite",
|
|
|
|
"test_nibbles",
|
|
|
|
"test_sparse_binary_trie",
|
|
|
|
"test_storage_backends",
|
|
|
|
"test_transaction_db",
|
|
|
|
]:
|
|
|
|
runTest("tests/trie/" & filename)
|
2019-02-15 14:46:44 +00:00
|
|
|
|
|
|
|
task test_trie, "run trie tests":
|
2019-03-25 21:22:02 +00:00
|
|
|
runTrieTests()
|
|
|
|
|
|
|
|
task test, "run tests":
|
|
|
|
for filename in [
|
|
|
|
"test_bloom",
|
|
|
|
"test_common",
|
|
|
|
]:
|
|
|
|
runTest("tests/" & filename)
|
|
|
|
|
|
|
|
runKeyfileTests()
|
|
|
|
runKeysTests()
|
|
|
|
runP2pTests()
|
|
|
|
runRlpTests()
|
|
|
|
runTrieTests()
|
2019-02-15 14:46:44 +00:00
|
|
|
|