Skip to content

Commit

Permalink
checkpoint the matrix after any alteration
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jan 4, 2021
1 parent 563f303 commit 48a033d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions testes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,11 @@ when isMainModule:
## guard against my stupidity
matrix.getOrDefault(p, Skip) != Skip

proc `[]=`(matrix: var Matrix; p: Profile; s: StatusKind) =
## emit the matrix report whenever it changes
tables.`[]=`(matrix, p, s)
checkpoint matrix

proc perform(matrix: var Matrix; profiles: seq[Profile]) =
## try to run a bunch of profiles and fail early if you can
var profiles = profiles
Expand All @@ -869,9 +874,6 @@ when isMainModule:
quit 1
matrix[p] = perform p

# for now, output the matrix after every test
checkpoint matrix

if matrix[p] > Part:
case $NimMajor & "." & $NimMinor
of "1.4":
Expand Down Expand Up @@ -901,8 +903,7 @@ when isMainModule:
proc profiles(fn: string): seq[Profile] =
## produce profiles for a given test filename
for opt in opt.keys:
# omit debug on ci
if not ci or opt > debug:
if not ci or opt > debug: # omit debug on ci
for gc in gc.items:
for cp in cp.items:
var profile = Profile(fn: fn, gc: gc, cp: cp, opt: opt)
Expand Down

0 comments on commit 48a033d

Please sign in to comment.