pass on testament args to sub-process (#6688)

This commit is contained in:
Jacek Sieka
2017-11-06 16:37:21 +08:00
committed by Andreas Rumpf
parent 0586529ff5
commit 11f6e626d7

View File

@@ -439,6 +439,8 @@ proc main() =
var optPrintResults = false
var optFailing = false
var targetsStr = ""
var p = initOptParser()
p.next()
while p.kind == cmdLongoption:
@@ -446,7 +448,9 @@ proc main() =
of "print", "verbose": optPrintResults = true
of "failing": optFailing = true
of "pedantic": discard "now always enabled"
of "targets": targets = parseTargets(p.val.string)
of "targets":
targetsStr = p.val.string
targets = parseTargets(targetsStr)
of "nim": compilerPrefix = p.val.string
else: quit Usage
p.next()
@@ -457,7 +461,10 @@ proc main() =
case action
of "all":
let testsDir = "tests" & DirSep
let myself = quoteShell(findExe("tests" / "testament" / "tester"))
var myself = quoteShell(findExe("tests" / "testament" / "tester")) &
" '--nim:" & compilerPrefix & "'"
if targetsStr.len > 0:
myself &= " '--targets:" & targetsStr & "'"
var cmds: seq[string] = @[]
let rest = if p.cmdLineRest.string.len > 0: " " & p.cmdLineRest.string else: ""
for kind, dir in walkDir(testsDir):