From c3cc66a1cc6e6e1637908ad88320a26fbc08bbc4 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 27 Jul 2022 12:48:29 +0100 Subject: [PATCH] mesonbuild/mtest.py: filter more invalid googletest JUnit4 attributes 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 --- mesonbuild/mtest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 711e6a8a4..bb4123980 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -775,6 +775,10 @@ class JunitBuilder(TestLogger): 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