summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-08-30 13:56:30 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-06-13 11:27:38 +0000
commit4cb46e27fdf30d6db9f7720fd23f7e983c38edaa (patch)
treed9be7dbec219b7531a6d0b147fd4d8de0b3a61bf
parent06f956b8f90b39562df9127221cf0440da2be0ac (diff)
generate_expected_output.py: more refinements to filtering of noise
Two more ways line numbers were making it through. Corrected a doc-string to tell nearer to the truth. Change-Id: I946aaeb936d47fffe50d7ec15e2524992cc9e428 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 98f454fbb4..a3a66da98b 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -64,12 +64,12 @@ class Cleaner (object):
def __init__(self, here, command):
"""Set up the details we need for later cleaning.
- Takes two parameters: here is $PWD and command is how this
- script was invoked, from which we'll work out where it is; in
- a shadow build, the former is the build tree's location
+ Takes two parameters: here is os.getcwd() and command is how
+ this script was invoked, from which we'll work out where it
+ is; in a shadow build, the former is the build tree's location
corresponding to this last. Saves the directory of this
script as self.sourceDir, so client can find tst_selftests.cpp
- there. Checks $PWD does look as expected in a build tree -
+ there. Checks here does look as expected in a build tree -
raising Fail() if not - then invokes qmake to discover Qt
version (saved as .version for the benefit of clients) and
prepares the sequence of (regex, replace) pairs that .clean()
@@ -90,9 +90,10 @@ class Cleaner (object):
(r'( *<QtBuild)>[^<]+</QtBuild>', r'\1/>'), # xml, lightxml
(r'(<property value=")[^"]+(" name="QtBuild"/>)', r'\1\2'), # xunitxml
# Line numbers in source files:
+ (r'(ASSERT: ".*" in file .*, line) \d+', r'\1 0'), # lightxml
(r'(Loc: \[[^[\]()]+)\(\d+\)', r'\1(0)'), # txt
(r'(\[Loc: [^[\]()]+)\(\d+\)', r'\1(0)'), # teamcity
- (r'(<Incident.*\bfile=.*\bline=)"\d+"', r'\1"0"'), # lightxml, xml
+ (r'(<(?:Incident|Message)\b.*\bfile=.*\bline=)"\d+"', r'\1"0"'), # lightxml, xml
),
precook = re.compile):
"""Private implementation details of __init__()."""