2021-03-02 13:32:20 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
|
|
|
packageName = "presto"
|
2021-09-07 10:28:56 +00:00
|
|
|
version = "0.0.4"
|
2021-03-02 13:32:20 +00:00
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "REST API implementation"
|
|
|
|
license = "MIT"
|
|
|
|
skipDirs = @["tests", "examples"]
|
|
|
|
|
|
|
|
requires "nim >= 1.2.0",
|
2021-12-03 16:14:25 +00:00
|
|
|
"chronos >= 3.0.9",
|
2021-03-02 13:32:20 +00:00
|
|
|
"chronicles",
|
|
|
|
"stew"
|
|
|
|
|
|
|
|
proc runTest(filename: string) =
|
2022-07-26 13:57:02 +00:00
|
|
|
let styleCheckStyle =
|
|
|
|
if (NimMajor, NimMinor) < (1, 6):
|
|
|
|
"hint"
|
|
|
|
else:
|
|
|
|
"error"
|
|
|
|
var excstr: string =
|
|
|
|
"nim c -r --hints:off --styleCheck:usages --styleCheck:" & styleCheckStyle &
|
|
|
|
" --skipParentCfg " & getEnv("NIMFLAGS") & " "
|
2021-03-02 13:32:20 +00:00
|
|
|
excstr.add("tests/" & filename)
|
|
|
|
exec excstr
|
|
|
|
rmFile "tests/" & filename.toExe
|
|
|
|
|
|
|
|
task test, "Runs rest tests":
|
|
|
|
runTest("testall")
|