Skip to content

Commit

Permalink
mesonbuild/mtest.py: filter more invalid googletest JUnit4 attributes
Browse files Browse the repository at this point in the history
googletest 1.12.1 generates new JUnit4 invalid attributes file and
line.

Maybe all gtest "invalid" attributes are actually valid JUnit5
attributes, and maybe schema should be upgraded to JUni5.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
  • Loading branch information
xnox authored and nirbheek committed Aug 12, 2022
1 parent 9e7b214 commit b32ad7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mesonbuild/mtest.py
Expand Up @@ -775,6 +775,10 @@ def log(self, harness: 'TestHarness', test: 'TestRun') -> None:
del case.attrib['result']
for case in suite.findall('.//testcase[@timestamp]'):
del case.attrib['timestamp']
for case in suite.findall('.//testcase[@file]'):
del case.attrib['file']
for case in suite.findall('.//testcase[@line]'):
del case.attrib['line']
self.root.append(suite)
return

Expand Down

0 comments on commit b32ad7e

Please sign in to comment.