improve nimsuggest/tester, minor improvements to koch.nim (#17879)
* improve nimsuggest/tester * koch improvements
This commit is contained in:
parent
e4db733d80
commit
a424075b5e
4 changed files with 24 additions and 23 deletions
21
koch.nim
21
koch.nim
|
|
@ -154,7 +154,7 @@ proc bundleNimbleExe(latest: bool, args: string) =
|
|||
|
||||
proc bundleNimsuggest(args: string) =
|
||||
nimCompileFold("Compile nimsuggest", "nimsuggest/nimsuggest.nim",
|
||||
options = "-d:release -d:danger " & args)
|
||||
options = "-d:danger " & args)
|
||||
|
||||
proc buildVccTool(args: string) =
|
||||
let input = "tools/vccexe/vccexe.nim"
|
||||
|
|
@ -558,28 +558,27 @@ proc runCI(cmd: string) =
|
|||
## run tests
|
||||
execFold("Test nimscript", "nim e tests/test_nimscript.nims")
|
||||
when defined(windows):
|
||||
# note: will be over-written below
|
||||
execFold("Compile tester", "nim c -d:nimCoroutines --os:genode -d:posix --compileOnly testament/testament")
|
||||
execFold("Compile tester", "nim c --usenimcache -d:nimCoroutines --os:genode -d:posix --compileOnly testament/testament")
|
||||
|
||||
# main bottleneck here
|
||||
# xxx: even though this is the main bottleneck, we could speedup the rest via batching with `--batch`.
|
||||
# BUG: with initOptParser, `--batch:'' all` interprets `all` as the argument of --batch, pending bug #14343
|
||||
execFold("Run tester", "nim c -r -d:nimCoroutines --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament $# all -d:nimCoroutines" % batchParam)
|
||||
execFold("Run tester", "nim c -r --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament $# all -d:nimCoroutines" % batchParam)
|
||||
|
||||
block CT_FFI:
|
||||
block: # nimHasLibFFI:
|
||||
when defined(posix): # windows can be handled in future PR's
|
||||
execFold("nimble install -y libffi", "nimble install -y libffi")
|
||||
const nimFFI = "./bin/nim.ctffi"
|
||||
const nimFFI = "bin/nim.ctffi"
|
||||
# no need to bootstrap with koch boot (would be slower)
|
||||
let backend = if doUseCpp(): "cpp" else: "c"
|
||||
execFold("build with -d:nimHasLibFFI", "nim $1 -d:release -d:nimHasLibFFI -o:$2 compiler/nim.nim" % [backend, nimFFI])
|
||||
execFold("test with -d:nimHasLibFFI", "$1 $2 -r testament/testament --nim:$1 r tests/misc/trunner.nim -d:nimTrunnerFfi" % [nimFFI, backend])
|
||||
|
||||
execFold("Run nimdoc tests", "nim c -r nimdoc/tester")
|
||||
execFold("Run rst2html tests", "nim c -r nimdoc/rsttester")
|
||||
execFold("Run nimpretty tests", "nim c -r nimpretty/tester.nim")
|
||||
execFold("Run nimdoc tests", "nim r nimdoc/tester")
|
||||
execFold("Run rst2html tests", "nim r nimdoc/rsttester")
|
||||
execFold("Run nimpretty tests", "nim r nimpretty/tester.nim")
|
||||
when defined(posix):
|
||||
execFold("Run nimsuggest tests", "nim c -r nimsuggest/tester")
|
||||
execFold("Run nimsuggest tests", "nim r nimsuggest/tester")
|
||||
|
||||
proc testUnixInstall(cmdLineRest: string) =
|
||||
csource("-d:danger" & cmdLineRest)
|
||||
|
|
@ -605,7 +604,7 @@ proc testUnixInstall(cmdLineRest: string) =
|
|||
execCleanPath("./koch tools")
|
||||
# check the tests work:
|
||||
putEnv("NIM_EXE_NOT_IN_PATH", "NOT_IN_PATH")
|
||||
execCleanPath("./koch tests --nim:./bin/nim cat megatest", destDir / "bin")
|
||||
execCleanPath("./koch tests --nim:bin/nim cat megatest", destDir / "bin")
|
||||
else:
|
||||
echo "Version check: failure"
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue