fix regression: -d:nimHasLibFFI was not being tested anymore (#14234)
* * fix regression: -d:nimHasLibFFI was not being tested anymore, in part because testament was silently treating some errors as easy to overlook messages * turned that message into an error * -d:nimHasLibFFI is now being tested with nim cpp * use correct signatures for importc procs * workaround for openbsd to unblock ctffi testing
This commit is contained in:
parent
b8e6ea7547
commit
330b3c4453
4 changed files with 50 additions and 26 deletions
9
koch.nim
9
koch.nim
|
|
@ -289,11 +289,13 @@ proc findStartNim: string =
|
|||
proc thVersion(i: int): string =
|
||||
result = ("compiler" / "nim" & $i).exe
|
||||
|
||||
template doUseCpp(): bool = getEnv("NIM_COMPILE_TO_CPP", "false") == "true"
|
||||
|
||||
proc boot(args: string) =
|
||||
var output = "compiler" / "nim".exe
|
||||
var finalDest = "bin" / "nim".exe
|
||||
# default to use the 'c' command:
|
||||
let useCpp = getEnv("NIM_COMPILE_TO_CPP", "false") == "true"
|
||||
let useCpp = doUseCpp()
|
||||
let smartNimcache = (if "release" in args or "danger" in args: "nimcache/r_" else: "nimcache/d_") &
|
||||
hostOS & "_" & hostCPU
|
||||
|
||||
|
|
@ -542,8 +544,9 @@ proc runCI(cmd: string) =
|
|||
execFold("nimble install -y libffi", "nimble install -y libffi")
|
||||
const nimFFI = "./bin/nim.ctffi"
|
||||
# no need to bootstrap with koch boot (would be slower)
|
||||
execFold("build with -d:nimHasLibFFI", "nim c -d:release -d:nimHasLibFFI -o:$1 compiler/nim.nim" % [nimFFI])
|
||||
execFold("test with -d:nimHasLibFFI", "$1 c -r testament/testament --nim:$1 r tests/vm/tevalffi.nim" % [nimFFI])
|
||||
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/trunner.nim" % [nimFFI, backend])
|
||||
|
||||
execFold("Run nimdoc tests", "nim c -r nimdoc/tester")
|
||||
execFold("Run nimpretty tests", "nim c -r nimpretty/tester.nim")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue