Commit 79cdb254 authored by thomie's avatar thomie
Browse files

Testsuite: ignore line number differences in call stacks (#10834)

Differential Revision: https://phabricator.haskell.org/D1206
parent e1293bbf
......@@ -1680,11 +1680,18 @@ def normalise_whitespace( str ):
str = re.sub('[ \t\n]+', ' ', str)
return str.strip()
def normalise_callstacks(str):
# Ignore line number differences in call stacks (#10834).
return re.sub(', called at (.+):[\\d]+:[\\d]+ in',
', called at \\1:<line>:<column> in',
str)
def normalise_errmsg( str ):
# remove " error:" and lower-case " Warning:" to make patch for
# trac issue #10021 smaller
str = modify_lines(str, lambda l: re.sub(' error:', '', l))
str = modify_lines(str, lambda l: re.sub(' Warning:', ' warning:', l))
str = normalise_callstacks(str)
# If somefile ends in ".exe" or ".exe:", zap ".exe" (for Windows)
# the colon is there because it appears in error messages; this
......@@ -1748,6 +1755,7 @@ def normalise_output( str ):
# Remove a .exe extension (for Windows)
# This can occur in error messages generated by the program.
str = re.sub('([^\\s])\\.exe', '\\1', str)
str = normalise_callstacks(str)
return str
def normalise_asm( str ):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment