forked from status-im/nim-json-rpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
json_rpc.nimble
35 lines (30 loc) · 1.25 KB
/
json_rpc.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
packageName = "json_rpc"
version = "0.0.2"
author = "Status Research & Development GmbH"
description = "Ethereum remote procedure calls"
license = "Apache License 2.0"
skipDirs = @["tests"]
### Dependencies
requires "nim >= 1.2.0",
"stew",
"nimcrypto",
"stint",
"chronos",
"httputils",
"chronicles",
"https://github.com/status-im/news#status",
"websock",
"https://github.com/yyoncho/asynctools#non-blocking",
"faststreams",
"json_serialization"
proc buildBinary(name: string, srcDir = "./", params = "", cmdParams = "") =
if not dirExists "build":
mkDir "build"
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " -r -f --skipUserCfg:on --skipParentCfg:on --verbosity:0 --hints:off --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR --out:./build/" & name & " " & params & " " & srcDir & name & ".nim" & " " & cmdParams
task test, "run tests":
buildBinary "all", "tests/",
params = "-d:json_rpc_websocket_package=websock"
buildBinary "all", "tests/",
params = "-d:json_rpc_websocket_package=news"
buildBinary "teststreamconnection", "tests/",
params = "-d:asyncBackend=asyncdispatch"