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.options = options
|
||||||
result.startTime = epochTime()
|
result.startTime = epochTime()
|
||||||
|
|
||||||
proc testNimblePackages(r: var TResults, cat: Category) =
|
proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string) =
|
||||||
if nimbleExe == "":
|
if nimbleExe == "":
|
||||||
echo "[Warning] - Cannot run nimble tests: Nimble binary not found."
|
echo "[Warning] - Cannot run nimble tests: Nimble binary not found."
|
||||||
return
|
return
|
||||||
|
|
@ -491,6 +491,8 @@ proc testNimblePackages(r: var TResults, cat: Category) =
|
||||||
var errors = 0
|
var errors = 0
|
||||||
try:
|
try:
|
||||||
for name, url, cmd, hasDep in listPackages():
|
for name, url, cmd, hasDep in listPackages():
|
||||||
|
if packageFilter notin name:
|
||||||
|
continue
|
||||||
inc r.total
|
inc r.total
|
||||||
var test = makeSupTest(url, "", cat)
|
var test = makeSupTest(url, "", cat)
|
||||||
let buildPath = packagesDir / name
|
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/gtk/*.nim", options, cat)
|
||||||
compileExample(r, "examples/talk/*.nim", options, cat)
|
compileExample(r, "examples/talk/*.nim", options, cat)
|
||||||
of "nimble-packages":
|
of "nimble-packages":
|
||||||
testNimblePackages(r, cat)
|
testNimblePackages(r, cat, options)
|
||||||
of "niminaction":
|
of "niminaction":
|
||||||
testNimInAction(r, cat, options)
|
testNimInAction(r, cat, options)
|
||||||
of "untestable":
|
of "untestable":
|
||||||
|
|
|
||||||
|
|
@ -717,7 +717,6 @@ proc main() =
|
||||||
of "c", "cat", "category":
|
of "c", "cat", "category":
|
||||||
skips = loadSkipFrom(skipFrom)
|
skips = loadSkipFrom(skipFrom)
|
||||||
var cat = Category(p.key)
|
var cat = Category(p.key)
|
||||||
p.next
|
|
||||||
processCategory(r, cat, p.cmdLineRest.string, testsDir, runJoinableTests = true)
|
processCategory(r, cat, p.cmdLineRest.string, testsDir, runJoinableTests = true)
|
||||||
of "pcat":
|
of "pcat":
|
||||||
skips = loadSkipFrom(skipFrom)
|
skips = loadSkipFrom(skipFrom)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue