allow category nimble-packages to test a single package (#13576)
This commit is contained in:
parent
fb641483f0
commit
88566cc651
2 changed files with 4 additions and 3 deletions
|
|
@ -478,7 +478,7 @@ proc makeSupTest(test, options: string, cat: Category): TTest =
|
|||
result.options = options
|
||||
result.startTime = epochTime()
|
||||
|
||||
proc testNimblePackages(r: var TResults, cat: Category) =
|
||||
proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string) =
|
||||
if nimbleExe == "":
|
||||
echo "[Warning] - Cannot run nimble tests: Nimble binary not found."
|
||||
return
|
||||
|
|
@ -491,6 +491,8 @@ proc testNimblePackages(r: var TResults, cat: Category) =
|
|||
var errors = 0
|
||||
try:
|
||||
for name, url, cmd, hasDep in listPackages():
|
||||
if packageFilter notin name:
|
||||
continue
|
||||
inc r.total
|
||||
var test = makeSupTest(url, "", cat)
|
||||
let buildPath = packagesDir / name
|
||||
|
|
@ -706,7 +708,7 @@ proc processCategory(r: var TResults, cat: Category,
|
|||
compileExample(r, "examples/gtk/*.nim", options, cat)
|
||||
compileExample(r, "examples/talk/*.nim", options, cat)
|
||||
of "nimble-packages":
|
||||
testNimblePackages(r, cat)
|
||||
testNimblePackages(r, cat, options)
|
||||
of "niminaction":
|
||||
testNimInAction(r, cat, options)
|
||||
of "untestable":
|
||||
|
|
|
|||
|
|
@ -717,7 +717,6 @@ proc main() =
|
|||
of "c", "cat", "category":
|
||||
skips = loadSkipFrom(skipFrom)
|
||||
var cat = Category(p.key)
|
||||
p.next
|
||||
processCategory(r, cat, p.cmdLineRest.string, testsDir, runJoinableTests = true)
|
||||
of "pcat":
|
||||
skips = loadSkipFrom(skipFrom)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue