Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
canelhasmateus committed Nov 21, 2021
1 parent ec0a814 commit 0c2babb
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 158 deletions.
2 changes: 1 addition & 1 deletion doc/testament.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Example "template" **to edit** and write a Testament unittest:
disabled: "32bit" # ...or architectures
disabled: "i386"
disabled: "azure" # ...or pipeline runners
disabled: true # ...or can disable the test entirely
"""
assert true
Expand Down
11 changes: 9 additions & 2 deletions testament/specs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type
# but don't rely on much precision
inlineErrors*: seq[InlineError] # line information to error message
debugInfo*: string # debug info to give more context
knownIssues*: seq[string] ## known issues to be fixed

proc getCmd*(s: TSpec): string =
if s.cmd.len == 0:
Expand Down Expand Up @@ -275,7 +276,7 @@ proc parseSpec*(filename: string): TSpec =
case e.kind
of cfgKeyValuePair:
let key = e.key.normalize
const allowMultipleOccurences = ["disabled", "ccodecheck"]
const allowMultipleOccurences = ["disabled", "ccodecheck" , "knownissue"]
## list of flags that are correctly handled when passed multiple times
## (instead of being overwritten)
if key notin allowMultipleOccurences:
Expand Down Expand Up @@ -385,7 +386,7 @@ proc parseSpec*(filename: string): TSpec =
of "netbsd":
when defined(netbsd): result.err = reDisabled
else:
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
result.parseErrors.addLine "cannot interpret as a bool or platform name: ", e.value
of "cmd":
if e.value.startsWith("nim "):
result.cmd = compilerPrefix & e.value[3..^1]
Expand All @@ -408,6 +409,12 @@ proc parseSpec*(filename: string): TSpec =
of "matrix":
for v in e.value.split(';'):
result.matrix.add(v.strip)
of "knownissue":
case e.value.normalize
of "n", "no", "false", "0": discard
else:
result.knownIssues.add e.value
result.err = reDisabled
else:
result.parseErrors.addLine "invalid key for test spec: ", e.key

Expand Down
95 changes: 0 additions & 95 deletions tests/bind/tdatabind.nim

This file was deleted.

25 changes: 0 additions & 25 deletions tests/closure/texplicit_dummy_closure.nim

This file was deleted.

6 changes: 0 additions & 6 deletions tests/lang/s01_basics/s05_data_types/t4_char.nim

This file was deleted.

25 changes: 0 additions & 25 deletions tests/parallel/t5000.nim

This file was deleted.

3 changes: 2 additions & 1 deletion tests/proc/t17157.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
discard """
errormsg: "'untyped' is only allowed in templates and macros or magic procs"
disabled: true
knownIssue: "https://github.com/nim-lang/Nim/issues/18113"
knownIssue: "https://github.com/nim-lang/Nim/issues/18124"
"""

template something(op: proc (v: untyped): void): void =
Expand Down
2 changes: 1 addition & 1 deletion tests/typerel/trectuple.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
discard """
errormsg: "illegal recursion in type 'TNode'"
line: 8
disabled: true
"""

type
Expand Down
2 changes: 1 addition & 1 deletion tests/typerel/trectype.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
discard """
errormsg: "internal error: cannot generate C type for: PA"
disabled: true
"""
# Test recursive type descriptions
# (mainly for the C code generator)
Expand Down
2 changes: 1 addition & 1 deletion tests/types/tisop.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
discard """
disabled: true
"""

import typetraits
Expand Down

0 comments on commit 0c2babb

Please sign in to comment.