Skip to content

Commit

Permalink
Fix running testament c nimble-packages without batch arg (nim-lang#1…
Browse files Browse the repository at this point in the history
…8023)

* Fix running testament c nimble-packages without batch arg

* Fix
  • Loading branch information
Clyybber authored May 17, 2021
1 parent 8be5344 commit fac5bae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions testament/categories.nim
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,12 @@ proc listPackages(packageFilter: string): seq[NimblePackage] =
# at least should be a regex; a substring match makes no sense.
result = pkgs.filterIt(packageFilter in it.name)
else:
let pkgs1 = pkgs.filterIt(it.allowFailure)
let pkgs2 = pkgs.filterIt(not it.allowFailure)
if testamentData0.batchArg == "allowed_failures":
result = pkgs1
result = pkgs.filterIt(it.allowFailure)
elif testamentData0.testamentNumBatch == 0:
result = pkgs
else:
let pkgs2 = pkgs.filterIt(not it.allowFailure)
for i in 0..<pkgs2.len:
if i mod testamentData0.testamentNumBatch == testamentData0.testamentBatch:
result.add pkgs2[i]
Expand Down

0 comments on commit fac5bae

Please sign in to comment.