run tests outside of nim compilation (#463)
else we need memory for both compiler and test
This commit is contained in:
parent
5ebd771d35
commit
53690f4717
|
@ -13,6 +13,8 @@ requires "nim >= 1.6.0",
|
||||||
"httputils",
|
"httputils",
|
||||||
"unittest2"
|
"unittest2"
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
|
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
|
||||||
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
||||||
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
||||||
|
@ -44,7 +46,8 @@ proc build(args, path: string) =
|
||||||
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
|
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
|
||||||
|
|
||||||
proc run(args, path: string) =
|
proc run(args, path: string) =
|
||||||
build args & " -r", path
|
build args, path
|
||||||
|
exec "build/" & path.splitPath[1]
|
||||||
|
|
||||||
task test, "Run all tests":
|
task test, "Run all tests":
|
||||||
for args in testArguments:
|
for args in testArguments:
|
||||||
|
|
Loading…
Reference in New Issue