fix #16576: honor matrix in testament by making such tests non joinable (#16577)

* refs #16576: honor matrix in testament by making such tests non joinable

* add tests + misc fixes

* fix test for i386 with -d:danger
This commit is contained in:
Timothee Cour 2021-01-04 10:45:46 -08:00 • committed by GitHub
commit 00144ee4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 12 deletions

View file

@ -88,11 +88,12 @@ proc isSuccess(input: string): bool =
# not clear how to do the equivalent of pkg/regex's: re"FOO(.*?)BAR" in pegs
input.startsWith("Hint: ") and input.endsWith("[SuccessX]")
proc normalizeMsg(s: string): string =
result = newStringOfCap(s.len+1)
for x in splitLines(s):
if result.len > 0: result.add '\L'
result.add x.strip
when false: # deadcode
proc normalizeMsg(s: string): string =
result = newStringOfCap(s.len+1)
for x in splitLines(s):
if result.len > 0: result.add '\L'
result.add x.strip
proc getFileDir(filename: string): string =
result = filename.splitFile().dir
@ -794,7 +795,7 @@ proc main() =
var subPath = p.key.string
let nimRoot = currentSourcePath / "../.."
# makes sure points to this regardless of cwd or which nim is used to compile this.
doAssert existsDir(nimRoot/testsDir) # sanity check
doAssert dirExists(nimRoot/testsDir) # sanity check
if subPath.isAbsolute: subPath = subPath.relativePath(nimRoot)
# at least one directory is required in the path, to use as a category name
let pathParts = subPath.relativePath(testsDir).split({DirSep, AltSep})