testlib selftest: unify xml quoted asserts that include line numbers

Change-Id: If66303bab10c23dd212a6abcdff3f145630e2401
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-07-22 13:36:20 +02:00
parent f1c16139e3
commit b33c056a61
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testNumber1"/>
<testcase result="fail" name="testNumber2">
<!-- message="ASSERT: &quot;false&quot; in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 53" type="qfatal" -->
<!-- message="ASSERT: &quot;false&quot; in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0" type="qfatal" -->
<failure message="Received a fatal error." result="fail"/>
</testcase>
<system-err>

View File

@ -8,7 +8,7 @@
<testcase result="pass" name="initTestCase"/>
<testcase result="fail" name="value">
<!-- message="expected data of type &apos;QString&apos;, got &apos;bool&apos; for element 0 of data with tag &apos;bool&#x002D;as&#x002D;string&apos;" type="qdebug" -->
<!-- message="ASSERT: &quot;false&quot; in file qtbase/src/testlib/qtestdata.cpp, line 92" type="qfatal" -->
<!-- message="ASSERT: &quot;false&quot; in file qtbase/src/testlib/qtestdata.cpp, line 0" type="qfatal" -->
<failure message="Received a fatal error." result="fail"/>
</testcase>
<system-err>

View File

@ -104,7 +104,7 @@ class Cleaner (object):
(r'( *<QtBuild)>[^<]+</QtBuild>', r'\1/>'), # xml, lightxml
(r'(<property value=")[^"]+(" name="QtBuild"/>)', r'\1\2'), # junitxml
# Line numbers in source files:
(r'(ASSERT: ".*" in file .*, line) \d+', r'\1 0'), # lightxml
(r'(ASSERT: ("|&quot;).*("|&quot;) in file .*, line) \d+', r'\1 0'), # lightxml
(r'(Loc: \[[^[\]()]+)\(\d+\)', r'\1(0)'), # txt
(r'(\[Loc: [^[\]()]+)\(\d+\)', r'\1(0)'), # teamcity
(r'(<(?:Incident|Message)\b.*\bfile=.*\bline=)"\d+"', r'\1"0"'), # lightxml, xml