nim: unbreak CI; testament: add allowedFailure logic for tests that may fail but should still run (#17513)
This commit is contained in:
parent
b77a420d3e
commit
6a355a4db0
3 changed files with 40 additions and 30 deletions
|
|
@ -448,7 +448,10 @@ proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string) =
|
|||
(outp, status) = execCmdEx(cmd, workingDir = workingDir2)
|
||||
status == QuitSuccess
|
||||
if not ok:
|
||||
addResult(r, test, targetC, "", cmd & "\n" & outp, reFailed)
|
||||
if pkg.allowFailure:
|
||||
inc r.passed
|
||||
inc r.failedButAllowed
|
||||
addResult(r, test, targetC, "", cmd & "\n" & outp, reFailed, allowFailure = pkg.allowFailure)
|
||||
continue
|
||||
outp
|
||||
|
||||
|
|
@ -461,7 +464,7 @@ proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string) =
|
|||
discard tryCommand("nimble install --depsOnly -y", maxRetries = 3)
|
||||
discard tryCommand(pkg.cmd, reFailed = reBuildFailed)
|
||||
inc r.passed
|
||||
r.addResult(test, targetC, "", "", reSuccess)
|
||||
r.addResult(test, targetC, "", "", reSuccess, allowFailure = pkg.allowFailure)
|
||||
|
||||
errors = r.total - r.passed
|
||||
if errors == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue