mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-08 00:23:12 +00:00
Add build test with chronicles to json enabled (#215)
* Add build test with chronicles to json enabled * Fix windows failing test
This commit is contained in:
parent
514049a287
commit
9c65df3053
@ -47,16 +47,14 @@ proc run(args, path: string) =
|
|||||||
if (NimMajor, NimMinor) > (1, 6):
|
if (NimMajor, NimMinor) > (1, 6):
|
||||||
build args & " --mm:refc -r", path
|
build args & " --mm:refc -r", path
|
||||||
|
|
||||||
proc buildBinary(name: string, srcDir = "./", params = "", cmdParams = "") =
|
proc buildOnly(args, path: string) =
|
||||||
if not dirExists "build":
|
build args, path
|
||||||
mkDir "build"
|
if (NimMajor, NimMinor) > (1, 6):
|
||||||
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") &
|
build args & " --mm:refc -r", path
|
||||||
" -r -f --skipUserCfg:on --skipParentCfg:on --verbosity:0" &
|
|
||||||
" --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR" &
|
|
||||||
" --styleCheck:usages --styleCheck:hint" &
|
|
||||||
" --hint[XDeclaredButNotUsed]:off --hint[Processing]:off " &
|
|
||||||
" --out:./build/" & name & " " & params & " " & srcDir & name & ".nim" &
|
|
||||||
" " & cmdParams
|
|
||||||
|
|
||||||
task test, "run tests":
|
task test, "run tests":
|
||||||
run "", "tests/all"
|
run "", "tests/all"
|
||||||
|
|
||||||
|
when not defined(windows):
|
||||||
|
# on windows, socker server build failed
|
||||||
|
buildOnly "-d:\"chronicles_sinks=textlines[dynamic],json[dynamic]\"", "tests/all"
|
||||||
|
|||||||
@ -110,7 +110,7 @@ proc processData(client: RpcSocketClient) {.async: (raises: []).} =
|
|||||||
|
|
||||||
# async loop reconnection and waiting
|
# async loop reconnection and waiting
|
||||||
try:
|
try:
|
||||||
info "Reconnect to server", address=client.address
|
info "Reconnect to server", address=`$`(client.address)
|
||||||
client.transport = await connect(client.address)
|
client.transport = await connect(client.address)
|
||||||
except TransportError as exc:
|
except TransportError as exc:
|
||||||
error "Error when reconnecting to server", msg=exc.msg
|
error "Error when reconnecting to server", msg=exc.msg
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user