[commit: ghc] master: Testsuite: ignore line number differences in call stacks (#10834) (79cdb25)

git at git.haskell.org git at git.haskell.org
Thu Sep 3 22:05:06 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/79cdb2544d2c68050dbd147936a31e8eb06a4c67/ghc

>---------------------------------------------------------------

commit 79cdb2544d2c68050dbd147936a31e8eb06a4c67
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu Sep 3 14:56:50 2015 +0200

    Testsuite: ignore line number differences in call stacks (#10834)
    
    Differential Revision: https://phabricator.haskell.org/D1206


>---------------------------------------------------------------

79cdb2544d2c68050dbd147936a31e8eb06a4c67
 testsuite/driver/testlib.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index ee6f631..6b3426e 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 ):



More information about the ghc-commits mailing list