pass on testament args to sub-process (#6688)
This commit is contained in:
parent
0586529ff5
commit
11f6e626d7
1 changed files with 9 additions and 2 deletions
|
|
@ -439,6 +439,8 @@ proc main() =
|
||||||
var optPrintResults = false
|
var optPrintResults = false
|
||||||
var optFailing = false
|
var optFailing = false
|
||||||
|
|
||||||
|
var targetsStr = ""
|
||||||
|
|
||||||
var p = initOptParser()
|
var p = initOptParser()
|
||||||
p.next()
|
p.next()
|
||||||
while p.kind == cmdLongoption:
|
while p.kind == cmdLongoption:
|
||||||
|
|
@ -446,7 +448,9 @@ proc main() =
|
||||||
of "print", "verbose": optPrintResults = true
|
of "print", "verbose": optPrintResults = true
|
||||||
of "failing": optFailing = true
|
of "failing": optFailing = true
|
||||||
of "pedantic": discard "now always enabled"
|
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
|
of "nim": compilerPrefix = p.val.string
|
||||||
else: quit Usage
|
else: quit Usage
|
||||||
p.next()
|
p.next()
|
||||||
|
|
@ -457,7 +461,10 @@ proc main() =
|
||||||
case action
|
case action
|
||||||
of "all":
|
of "all":
|
||||||
let testsDir = "tests" & DirSep
|
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] = @[]
|
var cmds: seq[string] = @[]
|
||||||
let rest = if p.cmdLineRest.string.len > 0: " " & p.cmdLineRest.string else: ""
|
let rest = if p.cmdLineRest.string.len > 0: " " & p.cmdLineRest.string else: ""
|
||||||
for kind, dir in walkDir(testsDir):
|
for kind, dir in walkDir(testsDir):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue