aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2023-08-14 09:03:42 -0500
committerXavier Claessens <xclaesse@gmail.com>2023-08-17 17:31:30 -0400
commit543e9ca0cf0c00d752bd723ec403e91b839bf9b4 (patch)
tree6aa548a9a08e537b0709b38f5f8ac45ad3753d4c /mesonbuild/mtest.py
parentf52bcaa27fc125ab9ae583af466ba99c164169f3 (diff)
downloadmeson-543e9ca0cf0c00d752bd723ec403e91b839bf9b4.zip
meson-543e9ca0cf0c00d752bd723ec403e91b839bf9b4.tar.gz
meson-543e9ca0cf0c00d752bd723ec403e91b839bf9b4.tar.bz2
Remove XML filter from testlog.{json,txt} and std streams
This was an unintended consequence of the original patch in #11977. Co-authored-by: Benoit Pierre <benoit.pierre@gmail.com>
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 1ac2782..1298cc0 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -869,10 +869,10 @@ class JunitBuilder(TestLogger):
et.SubElement(testcase, 'system-out').text = subtest.explanation
if test.stdo:
out = et.SubElement(suite, 'system-out')
- out.text = test.stdo.rstrip()
+ out.text = replace_unencodable_xml_chars(test.stdo.rstrip())
if test.stde:
err = et.SubElement(suite, 'system-err')
- err.text = test.stde.rstrip()
+ err.text = replace_unencodable_xml_chars(test.stde.rstrip())
else:
if test.project not in self.suites:
suite = self.suites[test.project] = et.Element(
@@ -895,10 +895,10 @@ class JunitBuilder(TestLogger):
suite.attrib['failures'] = str(int(suite.attrib['failures']) + 1)
if test.stdo:
out = et.SubElement(testcase, 'system-out')
- out.text = test.stdo.rstrip()
+ out.text = replace_unencodable_xml_chars(test.stdo.rstrip())
if test.stde:
err = et.SubElement(testcase, 'system-err')
- err.text = test.stde.rstrip()
+ err.text = replace_unencodable_xml_chars(test.stde.rstrip())
async def finish(self, harness: 'TestHarness') -> None:
"""Calculate total test counts and write out the xml result."""
@@ -1182,9 +1182,9 @@ def decode(stream: T.Union[None, bytes]) -> str:
if stream is None:
return ''
try:
- return replace_unencodable_xml_chars(stream.decode('utf-8'))
+ return stream.decode('utf-8')
except UnicodeDecodeError:
- return replace_unencodable_xml_chars(stream.decode('iso-8859-1', errors='ignore'))
+ return stream.decode('iso-8859-1', errors='ignore')
async def read_decode(reader: asyncio.StreamReader,
queue: T.Optional['asyncio.Queue[T.Optional[str]]'],