Remove obsolete method analyzeAndConsolidateOutput (#6998)
After the change, when stacktraces rendered in reversed order (most recent call first), this method removed all stacktraces in the test failures.
This commit is contained in:
parent
c87d617718
commit
3f2636c765
1 changed files with 1 additions and 16 deletions
|
|
@ -290,20 +290,6 @@ proc compilerOutputTests(test: TTest, target: TTarget, given: var TSpec,
|
||||||
if given.err == reSuccess: inc(r.passed)
|
if given.err == reSuccess: inc(r.passed)
|
||||||
r.addResult(test, target, expectedmsg, givenmsg, given.err)
|
r.addResult(test, target, expectedmsg, givenmsg, given.err)
|
||||||
|
|
||||||
proc analyzeAndConsolidateOutput(s: string): string =
|
|
||||||
result = ""
|
|
||||||
let rows = s.splitLines
|
|
||||||
for i in 0 ..< rows.len:
|
|
||||||
if (let pos = find(rows[i], "Traceback (most recent call last)"); pos != -1):
|
|
||||||
result = substr(rows[i], pos) & "\n"
|
|
||||||
for i in i+1 ..< rows.len:
|
|
||||||
result.add rows[i] & "\n"
|
|
||||||
if not (rows[i] =~ peg"['(']+ '(' \d+ ')' \s+"):
|
|
||||||
return
|
|
||||||
elif (let pos = find(rows[i], "SIGSEGV: Illegal storage access."); pos != -1):
|
|
||||||
result = substr(rows[i], pos)
|
|
||||||
return
|
|
||||||
|
|
||||||
proc testSpec(r: var TResults, test: TTest, target = targetC) =
|
proc testSpec(r: var TResults, test: TTest, target = targetC) =
|
||||||
let tname = test.name.addFileExt(".nim")
|
let tname = test.name.addFileExt(".nim")
|
||||||
#echo "TESTING ", tname
|
#echo "TESTING ", tname
|
||||||
|
|
@ -376,8 +362,7 @@ proc testSpec(r: var TResults, test: TTest, target = targetC) =
|
||||||
if exitCode != expected.exitCode:
|
if exitCode != expected.exitCode:
|
||||||
r.addResult(test, target, "exitcode: " & $expected.exitCode,
|
r.addResult(test, target, "exitcode: " & $expected.exitCode,
|
||||||
"exitcode: " & $exitCode & "\n\nOutput:\n" &
|
"exitcode: " & $exitCode & "\n\nOutput:\n" &
|
||||||
analyzeAndConsolidateOutput(bufB),
|
bufB, reExitCodesDiffer)
|
||||||
reExitCodesDiffer)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if bufB != expectedOut and expected.action != actionRunNoSpec:
|
if bufB != expectedOut and expected.action != actionRunNoSpec:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue