Merge branch 'devel' into jpoirier-realtimeGCTest
This commit is contained in:
commit
9c4a74637d
250 changed files with 10952 additions and 8848 deletions
|
|
@ -50,7 +50,7 @@ type
|
|||
|
||||
let
|
||||
pegLineError =
|
||||
peg"{[^(]*} '(' {\d+} ', ' \d+ ') ' ('Error') ':' \s* {.*}"
|
||||
peg"{[^(]*} '(' {\d+} ', ' {\d+} ') ' ('Error') ':' \s* {.*}"
|
||||
pegOtherError = peg"'Error:' \s* {.*}"
|
||||
pegSuccess = peg"'Hint: operation successful'.*"
|
||||
pegOfInterest = pegLineError / pegOtherError
|
||||
|
|
@ -77,11 +77,13 @@ proc callCompiler(cmdTemplate, filename, options: string,
|
|||
result.msg = ""
|
||||
result.file = ""
|
||||
result.outp = ""
|
||||
result.line = -1
|
||||
result.line = 0
|
||||
result.column = 0
|
||||
if err =~ pegLineError:
|
||||
result.file = extractFilename(matches[0])
|
||||
result.line = parseInt(matches[1])
|
||||
result.msg = matches[2]
|
||||
result.column = parseInt(matches[2])
|
||||
result.msg = matches[3]
|
||||
elif err =~ pegOtherError:
|
||||
result.msg = matches[0]
|
||||
elif suc =~ pegSuccess:
|
||||
|
|
@ -149,8 +151,11 @@ proc cmpMsgs(r: var TResults, expected, given: TSpec, test: TTest) =
|
|||
elif extractFilename(expected.file) != extractFilename(given.file) and
|
||||
"internal error:" notin expected.msg:
|
||||
r.addResult(test, expected.file, given.file, reFilesDiffer)
|
||||
elif expected.line != given.line and expected.line != 0:
|
||||
r.addResult(test, $expected.line, $given.line, reLinesDiffer)
|
||||
elif expected.line != given.line and expected.line != 0 or
|
||||
expected.column != given.column and expected.column != 0:
|
||||
r.addResult(test, $expected.line & ':' & $expected.column,
|
||||
$given.line & ':' & $given.column,
|
||||
reLinesDiffer)
|
||||
else:
|
||||
r.addResult(test, expected.msg, given.msg, reSuccess)
|
||||
inc(r.passed)
|
||||
|
|
@ -210,7 +215,12 @@ proc testSpec(r: var TResults, test: TTest) =
|
|||
let tname = test.name.addFileExt(".nim")
|
||||
inc(r.total)
|
||||
styledEcho "Processing ", fgCyan, extractFilename(tname)
|
||||
var expected = parseSpec(tname)
|
||||
var expected: TSpec
|
||||
if test.action != actionRunNoSpec:
|
||||
expected = parseSpec(tname)
|
||||
else:
|
||||
specDefaults expected
|
||||
expected.action = actionRunNoSpec
|
||||
if expected.err == reIgnored:
|
||||
r.addResult(test, "", "", reIgnored)
|
||||
inc(r.skipped)
|
||||
|
|
@ -220,7 +230,7 @@ proc testSpec(r: var TResults, test: TTest) =
|
|||
var given = callCompiler(expected.cmd, test.name,
|
||||
test.options & " --hint[Path]:off --hint[Processing]:off", test.target)
|
||||
compilerOutputTests(test, given, expected, r)
|
||||
of actionRun:
|
||||
of actionRun, actionRunNoSpec:
|
||||
var given = callCompiler(expected.cmd, test.name, test.options,
|
||||
test.target)
|
||||
if given.err != reSuccess:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue