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"]
|
|
|
|
|
2019-02-05 13:10:23 +02:00
|
|
|
requires "nim >= 0.19.0",
|
2019-02-05 12:10:36 +02:00
|
|
|
"nimcrypto",
|
|
|
|
"ranges",
|
|
|
|
"stint",
|
2019-02-05 12:32:22 +02:00
|
|
|
"byteutils",
|
2019-02-05 16:06:13 +02:00
|
|
|
"secp256k1",
|
2019-02-05 17:54:17 +02:00
|
|
|
"rocksdb",
|
|
|
|
"package_visible_types",
|
2019-02-06 19:11:29 +01:00
|
|
|
"chronos",
|
2019-03-11 11:22:06 +02:00
|
|
|
"chronicles",
|
|
|
|
"std_shims"
|
2019-02-05 12:32:22 +02:00
|
|
|
|
2019-02-05 12:56:28 +02:00
|
|
|
import strutils
|
|
|
|
import oswalkdir, ospaths # In newer nim these are merged to os
|
2019-02-05 12:10:36 +02:00
|
|
|
|
2019-02-15 15:46:44 +01:00
|
|
|
proc test(path: string) =
|
|
|
|
echo "Running: ", path
|
|
|
|
exec "nim c -r " & path
|
|
|
|
|
|
|
|
proc run_tests(dir: string) =
|
|
|
|
for path in walkDirRec(dir):
|
|
|
|
let fname = splitPath(path).tail
|
|
|
|
if fname.startsWith("test_") and fname.endsWith(".nim"):
|
|
|
|
test(path)
|
|
|
|
|
2019-02-05 12:10:36 +02:00
|
|
|
task test, "run tests":
|
2019-02-15 15:46:44 +01:00
|
|
|
run_tests("tests")
|
|
|
|
|
|
|
|
task test_keyfile, "run keyfile tests":
|
|
|
|
run_tests("tests/keyfile")
|
|
|
|
|
|
|
|
task test_keys, "run keys tests":
|
|
|
|
run_tests("tests/keys")
|
|
|
|
|
|
|
|
task test_p2p, "run p2p tests":
|
|
|
|
run_tests("tests/p2p")
|
|
|
|
|
|
|
|
task test_rlp, "run rlp tests":
|
|
|
|
run_tests("tests/rlp")
|
|
|
|
|
|
|
|
task test_trie, "run trie tests":
|
|
|
|
run_tests("tests/trie")
|
|
|
|
|