fixes test

This commit is contained in:
jangko 2020-12-24 16:32:59 +07:00
parent dd2a6d8ac3
commit 5d36ea5900
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 14 additions and 4 deletions

View File

@ -11,7 +11,17 @@ requires "nim >= 0.17.0",
"serialization",
"stew"
task test, "Run all tests":
exec "nim c -r --threads:off tests/test_all"
exec "nim c -r --threads:on tests/test_all"
proc test(env, path: string) =
# Compilation language is controlled by TEST_LANG
var lang = "c"
if existsEnv"TEST_LANG":
lang = getEnv"TEST_LANG"
if not dirExists "build":
mkDir "build"
exec "nim " & lang & " " & env &
" -r --hints:off --warnings:off " & path
task test, "Run all tests":
test "--threads:off", "tests/test_all"
test "--threads:on", "tests/test_all"

View File

@ -269,4 +269,4 @@ suite "toJson tests":
check decoded["tasks"][0]["label"] == newJString("nim-beacon-chain build")
except SerializationError as err:
checkpoint err.formatMsg("./cases/comments.json")
fail
check false