Skip to content

Commit

Permalink
3.4.2: local fails are still fails
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Aug 2, 2021
1 parent 8c51a63 commit 083a67a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion balls.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.4.1"
version = "3.4.2"
author = "disruptek"
description = "a unittest framework with balls 🔴🟡🟢"
license = "MIT"
Expand Down
36 changes: 19 additions & 17 deletions balls/runner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,18 @@ proc `[]=`(matrix: var Matrix; p: Profile; s: StatusKind) =
proc shouldPass(p: Profile): bool =
## true if the test should pass according to current nim climate
const MajorMinor = $NimMajor & "." & $NimMinor
# don't quit when run locally; just keep chugging away
if ci and ballsFailFast:
# neither cpp or js or nimscript backends are required to work
if p.cp notin {cpp, js, e}:
# danger builds can fail; they include experimental features
if p.opt notin {danger}:
result = true
case MajorMinor
of "1.4", "1.3", "1.2", "1.1", "1.0":
# arc/orc have fatal bugs on 1.4
if p.gc >= arc:
result = false
else:
discard
# neither cpp or js or nimscript backends are required to work
if p.cp notin {cpp, js, e}:
# danger builds can fail; they include experimental features
if p.opt notin {danger}:
result = true
case MajorMinor
of "1.4", "1.3", "1.2", "1.1", "1.0":
# arc/orc have fatal bugs on 1.4
if p.gc >= arc:
result = false
else:
discard

var cores: Semaphore
cores.init countProcessors()
Expand Down Expand Up @@ -437,9 +435,13 @@ proc performThreaded(p: Payload) {.thread.} =
discard
else:
if p.profile.shouldPass:
# if we should crash, go ahead and raise
raise CatchableError.newException:
"failure: " & $p.profile & "\n" & p.profile.run
let message = "failure: " & $p.profile & "\n" & p.profile.run
when ballsFailFast:
# if we should crash, go ahead and raise
raise CatchableError.newException message
else:
# or just emit an error message
checkpoint message

proc lesserTestFailed(matrix: Matrix; profile: Profile): bool =
## true if a lesser test already failed, meaning we can
Expand Down

0 comments on commit 083a67a

Please sign in to comment.