From 2edc2fc85db01324945a9229595b0a5436505db1 Mon Sep 17 00:00:00 2001 From: Timofey Date: Tue, 28 Feb 2017 13:28:57 +0300 Subject: [PATCH] Added more characters for replacement in log to xml converter. --- tools/python/testlog_to_xml_converter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/python/testlog_to_xml_converter.py b/tools/python/testlog_to_xml_converter.py index 62f8e3a2ba..4ae31475c8 100755 --- a/tools/python/testlog_to_xml_converter.py +++ b/tools/python/testlog_to_xml_converter.py @@ -15,6 +15,8 @@ import xml.etree.ElementTree as ElementTree from optparse import OptionParser import re +REPLACE_CHARS_RE = re.compile("[\x00-\x1f]") + class PrefixesInLog: OK = "OK" @@ -202,7 +204,7 @@ class Parser: if line == "All tests passed." or re.match("\d{1,} tests failed", line, re.IGNORECASE): self.var_should_pass = True return False - line = line.replace("\0", "\\0") + line = REPLACE_CHARS_RE.sub("_", line) self.test_info.append_comment(line) return False