Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ara Adkins
Glasgow Haskell Compiler
Commits
79cdb254
Commit
79cdb254
authored
Sep 03, 2015
by
Thomas Miedema
Browse files
Testsuite: ignore line number differences in call stacks (#10834)
Differential Revision:
https://phabricator.haskell.org/D1206
parent
e1293bbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
79cdb254
...
@@ -1680,11 +1680,18 @@ def normalise_whitespace( str ):
...
@@ -1680,11 +1680,18 @@ def normalise_whitespace( str ):
str
=
re
.
sub
(
'[
\t\n
]+'
,
' '
,
str
)
str
=
re
.
sub
(
'[
\t\n
]+'
,
' '
,
str
)
return
str
.
strip
()
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
):
def
normalise_errmsg
(
str
):
# remove " error:" and lower-case " Warning:" to make patch for
# remove " error:" and lower-case " Warning:" to make patch for
# trac issue #10021 smaller
# trac issue #10021 smaller
str
=
modify_lines
(
str
,
lambda
l
:
re
.
sub
(
' error:'
,
''
,
l
))
str
=
modify_lines
(
str
,
lambda
l
:
re
.
sub
(
' error:'
,
''
,
l
))
str
=
modify_lines
(
str
,
lambda
l
:
re
.
sub
(
' Warning:'
,
' warning:'
,
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)
# If somefile ends in ".exe" or ".exe:", zap ".exe" (for Windows)
# the colon is there because it appears in error messages; this
# the colon is there because it appears in error messages; this
...
@@ -1748,6 +1755,7 @@ def normalise_output( str ):
...
@@ -1748,6 +1755,7 @@ def normalise_output( str ):
# Remove a .exe extension (for Windows)
# Remove a .exe extension (for Windows)
# This can occur in error messages generated by the program.
# This can occur in error messages generated by the program.
str
=
re
.
sub
(
'([^
\\
s])
\\
.exe'
,
'
\\
1'
,
str
)
str
=
re
.
sub
(
'([^
\\
s])
\\
.exe'
,
'
\\
1'
,
str
)
str
=
normalise_callstacks
(
str
)
return
str
return
str
def
normalise_asm
(
str
):
def
normalise_asm
(
str
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment