testerscript.nim: pass Nim flags

This commit is contained in:
Anna “CyberTailor” 2022-06-29 15:27:40 +05:00
parent 72eb67de3a
commit 0c44b7f771
Signed by: CyberTaIlor
GPG Key ID: E7B76EDC50864BB1
2 changed files with 6 additions and 4 deletions

View File

@ -16,5 +16,5 @@ withDir("$#"):
for test in listFiles("."):
if test.startsWith("./t") and test.endsWith(".nim"):
echo "-- Running test ", test, "..."
exec("$# --hints:off r " & test)
""" % [testsDir, getNimBin(options).quoteShell])
exec("$# --hints:off $# r " & test)
""" % [testsDir, getNimBin(options).quoteShell, options.passNimFlags.join(" ")])

View File

@ -11,13 +11,15 @@ withDir("tests/testerscript/tests"):
for test in listFiles("."):
if test.startsWith("./t") and test.endsWith(".nim"):
echo "-- Running test ", test, "..."
exec("/usr/bin/nim --hints:off r " & test)
exec("/usr/bin/nim --hints:off -d:release --threads:on r " & test)
'''
"""
import os
import nimbs/options, nimbs/testerscript
let opts = Options(sourceDir: "tests" / "testerscript", nim: "/usr/bin/nim")
let opts = Options(sourceDir: "tests" / "testerscript",
nim: "/usr/bin/nim",
passNimFlags: @["-d:release", "--threads:on"])
stdout.writeTesterScript(opts)