run tests outside of nim compilation (#463)

else we need memory for both compiler and test
This commit is contained in:
Jacek Sieka 2023-11-08 16:14:33 +01:00 committed by GitHub
parent 5ebd771d35
commit 53690f4717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,8 @@ requires "nim >= 1.6.0",
"httputils",
"unittest2"
import os
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
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
proc run(args, path: string) =
build args & " -r", path
build args, path
exec "build/" & path.splitPath[1]
task test, "Run all tests":
for args in testArguments: