Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow category nimble-packages to test a single package #13576

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions testament/categories.nim
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,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
Expand All @@ -493,6 +493,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
Expand Down Expand Up @@ -708,7 +710,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":
Expand Down
1 change: 0 additions & 1 deletion testament/testament.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down