From 4cb46e27fdf30d6db9f7720fd23f7e983c38edaa Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 30 Aug 2016 13:56:30 +0200 Subject: [PATCH] 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 --- .../testlib/selftests/generate_expected_output.py | 11 ++++++----- 1 file 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'( *[^<]+', r'\1/>'), # xml, lightxml (r'()', 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'(