summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-09-03 14:56:50 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-09-04 00:06:17 +0200
commit79cdb2544d2c68050dbd147936a31e8eb06a4c67 (patch)
treea3f022253871b31a38e91d8c807b1d8243f755f2 /testsuite/driver
parente1293bbfb1fa1fdeb56446a7b957d6f628042e71 (diff)
downloadhaskell-79cdb2544d2c68050dbd147936a31e8eb06a4c67.tar.gz
Testsuite: ignore line number differences in call stacks (#10834)
Differential Revision: https://phabricator.haskell.org/D1206
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/testlib.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index ee6f631cbe..6b3426ef40 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -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 ):