* Fixes #802, #803 and #3775 - genscript issues * Test case for genscript * Test script * Verify on Linux * Update categories.nim * Fix merge * Improve test framework * Windows fixes
This commit is contained in:
parent
b34580fd5b
commit
e931f3b5a9
8 changed files with 57 additions and 12 deletions
|
|
@ -63,6 +63,26 @@ proc compileRodFiles(r: var TResults, cat: Category, options: string) =
|
|||
test "gtkex1", true
|
||||
test "gtkex2"
|
||||
|
||||
# --------------------- flags tests -------------------------------------------
|
||||
|
||||
proc flagTests(r: var TResults, cat: Category, options: string) =
|
||||
# --genscript
|
||||
const filename = "tests"/"flags"/"tgenscript"
|
||||
const genopts = " --genscript"
|
||||
let nimcache = nimcacheDir(filename, genopts, targetC)
|
||||
testSpec r, makeTest(filename, genopts, cat)
|
||||
|
||||
when defined(windows):
|
||||
testExec r, makeTest(filename, " cmd /c cd " & nimcache &
|
||||
" && compile_tgenscript.bat", cat)
|
||||
|
||||
when defined(linux):
|
||||
testExec r, makeTest(filename, " sh -c \"cd " & nimcache &
|
||||
" && sh compile_tgenscript.sh\"", cat)
|
||||
|
||||
# Run
|
||||
testExec r, makeTest(filename, " " & nimcache / "tgenscript", cat)
|
||||
|
||||
# --------------------- DLL generation tests ----------------------------------
|
||||
|
||||
proc safeCopyFile(src, dest: string) =
|
||||
|
|
@ -323,7 +343,7 @@ var nimbleDir = getEnv("NIMBLE_DIR").string
|
|||
if nimbleDir.len == 0: nimbleDir = getHomeDir() / ".nimble"
|
||||
let
|
||||
nimbleExe = findExe("nimble")
|
||||
packageDir = nimbleDir / "pkgs"
|
||||
#packageDir = nimbleDir / "pkgs" # not used
|
||||
packageIndex = nimbleDir / "packages.json"
|
||||
|
||||
proc waitForExitEx(p: Process): int =
|
||||
|
|
@ -407,9 +427,9 @@ proc `&.?`(a, b: string): string =
|
|||
# candidate for the stdlib?
|
||||
result = if b.startswith(a): b else: a & b
|
||||
|
||||
proc `&?.`(a, b: string): string =
|
||||
#proc `&?.`(a, b: string): string = # not used
|
||||
# candidate for the stdlib?
|
||||
result = if a.endswith(b): a else: a & b
|
||||
#result = if a.endswith(b): a else: a & b
|
||||
|
||||
proc processSingleTest(r: var TResults, cat: Category, options, test: string) =
|
||||
let test = "tests" & DirSep &.? cat.string / test
|
||||
|
|
@ -429,6 +449,8 @@ proc processCategory(r: var TResults, cat: Category, options: string) =
|
|||
jsTests(r, cat, options)
|
||||
of "dll":
|
||||
dllTests(r, cat, options)
|
||||
of "flags":
|
||||
flagTests(r, cat, options)
|
||||
of "gc":
|
||||
gcTests(r, cat, options)
|
||||
of "longgc":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue