Skip to content

Commit

Permalink
only disable 32-bit-failing tests in 32-bit builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Oct 4, 2018
1 parent 7aa0c38 commit 7459650
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ func failIn32Bits(folder, name: string): bool =
"call_then_create_successful_then_returndatasize.json",
"call_outsize_then_create_successful_then_returndatasize.json"]

func allowedFailInCurrentBuild(folder, name: string): bool =
when sizeof(int) == 4:
if failIn32Bits(folder, name):
return true
return allowedFailingGeneralStateTest(folder, name)

func validTest*(folder: string, name: string): bool =
# tests we want to skip or which segfault will be skipped here
result = (folder != "vmPerformance" or "loop" notin name) and
Expand Down Expand Up @@ -134,7 +140,7 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
status[folder][name] = Status.OK
except AssertionError:
status[folder][name] = Status.FAIL
if not allowedFailingGeneralStateTest(folder, name) and not failIn32Bits(folder, name):
if not allowedFailInCurrentBuild(folder, name):
raise

status.sort do (a: (string, OrderedTable[string, Status]),
Expand Down

0 comments on commit 7459650

Please sign in to comment.