test DLL generation with ORC (#21445)
* test DLL generation with ORC * fixes * fixes refc * Update testament/categories.nim
This commit is contained in:
parent
d51a392149
commit
2e2affb13c
1 changed files with 15 additions and 9 deletions
|
|
@ -47,21 +47,24 @@ proc isTestFile*(file: string): bool =
|
||||||
|
|
||||||
# --------------------- DLL generation tests ----------------------------------
|
# --------------------- DLL generation tests ----------------------------------
|
||||||
|
|
||||||
proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) =
|
proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string, isOrc = false) =
|
||||||
const rpath = when defined(macosx):
|
const rpath = when defined(macosx):
|
||||||
" --passL:-rpath --passL:@loader_path"
|
" --passL:-rpath --passL:@loader_path"
|
||||||
else:
|
else:
|
||||||
""
|
""
|
||||||
|
|
||||||
var test1 = makeTest("lib/nimrtl.nim", options & " --outdir:tests/dll", cat)
|
if not defined(windows) or not isOrc: # todo fix me on windows
|
||||||
test1.spec.action = actionCompile
|
var test1 = makeTest("lib/nimrtl.nim", options & " --outdir:tests/dll", cat)
|
||||||
testSpec c, test1
|
test1.spec.action = actionCompile
|
||||||
|
testSpec c, test1
|
||||||
var test2 = makeTest("tests/dll/server.nim", options & " --threads:on" & rpath, cat)
|
var test2 = makeTest("tests/dll/server.nim", options & " --threads:on" & rpath, cat)
|
||||||
test2.spec.action = actionCompile
|
test2.spec.action = actionCompile
|
||||||
testSpec c, test2
|
testSpec c, test2
|
||||||
var test3 = makeTest("lib/nimhcr.nim", options & " --threads:off --outdir:tests/dll" & rpath, cat)
|
|
||||||
test3.spec.action = actionCompile
|
if not isOrc:
|
||||||
testSpec c, test3
|
var test3 = makeTest("lib/nimhcr.nim", options & " --threads:off --outdir:tests/dll" & rpath, cat)
|
||||||
|
test3.spec.action = actionCompile
|
||||||
|
testSpec c, test3
|
||||||
var test4 = makeTest("tests/dll/visibility.nim", options & " --threads:off --app:lib" & rpath, cat)
|
var test4 = makeTest("tests/dll/visibility.nim", options & " --threads:off --app:lib" & rpath, cat)
|
||||||
test4.spec.action = actionCompile
|
test4.spec.action = actionCompile
|
||||||
testSpec c, test4
|
testSpec c, test4
|
||||||
|
|
@ -76,8 +79,9 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) =
|
||||||
putEnv(libpathenv, "tests/dll" & (if libpath.len > 0: ":" & libpath else: ""))
|
putEnv(libpathenv, "tests/dll" & (if libpath.len > 0: ":" & libpath else: ""))
|
||||||
defer: putEnv(libpathenv, libpath)
|
defer: putEnv(libpathenv, libpath)
|
||||||
|
|
||||||
testSpec r, makeTest("tests/dll/client.nim", options & " --threads:on" & rpath, cat)
|
if not isOrc:
|
||||||
testSpec r, makeTest("tests/dll/nimhcr_unit.nim", options & " --threads:off" & rpath, cat)
|
testSpec r, makeTest("tests/dll/client.nim", options & " --threads:on" & rpath, cat)
|
||||||
|
testSpec r, makeTest("tests/dll/nimhcr_unit.nim", options & " --threads:off" & rpath, cat)
|
||||||
testSpec r, makeTest("tests/dll/visibility.nim", options & " --threads:off" & rpath, cat)
|
testSpec r, makeTest("tests/dll/visibility.nim", options & " --threads:off" & rpath, cat)
|
||||||
|
|
||||||
if "boehm" notin options:
|
if "boehm" notin options:
|
||||||
|
|
@ -96,6 +100,8 @@ proc dllTests(r: var TResults, cat: Category, options: string) =
|
||||||
|
|
||||||
runBasicDLLTest c, r, cat, options & " --mm:refc"
|
runBasicDLLTest c, r, cat, options & " --mm:refc"
|
||||||
runBasicDLLTest c, r, cat, options & " -d:release --mm:refc"
|
runBasicDLLTest c, r, cat, options & " -d:release --mm:refc"
|
||||||
|
runBasicDLLTest c, r, cat, options, isOrc = true
|
||||||
|
runBasicDLLTest c, r, cat, options & " -d:release", isOrc = true
|
||||||
when not defined(windows):
|
when not defined(windows):
|
||||||
# still cannot find a recent Windows version of boehm.dll:
|
# still cannot find a recent Windows version of boehm.dll:
|
||||||
runBasicDLLTest c, r, cat, options & " --gc:boehm"
|
runBasicDLLTest c, r, cat, options & " --gc:boehm"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue