summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index c41bb8cb65..4e9a1fbfa4 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1691,12 +1691,20 @@ def normalise_callstacks(str):
# Ignore line number differences in call stacks (#10834).
return re.sub(', called at (.+):[\\d]+:[\\d]+ in [\\w\-\.]+:', repl, str)
+def normalise_type_reps(str):
+ """ Normalise out fingerprints from Typeable TyCon representations """
+ return re.sub(r'TyCon\s*\d+\#\#\s*\d+\#\#\s*',
+ 'TyCon FINGERPRINT FINGERPRINT ',
+ str,
+ flags=re.MULTILINE)
+
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)
+ str = normalise_type_reps(str)
# If somefile ends in ".exe" or ".exe:", zap ".exe" (for Windows)
# the colon is there because it appears in error messages; this
@@ -1766,6 +1774,7 @@ def normalise_output( str ):
# This can occur in error messages generated by the program.
str = re.sub('([^\\s])\\.exe', '\\1', str)
str = normalise_callstacks(str)
+ str = normalise_type_reps(str)
return str
def normalise_asm( str ):