sanitycheck: remove special ansi charachters from xml

XML does not like special ansi charachters (coming from logger), so
remove them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-09-23 09:41:59 -05:00
parent 43398eb240
commit ba4643b778

View file

@ -2254,7 +2254,9 @@ class TestSuite:
if os.path.exists(bl):
with open(bl, "rb") as f:
log = f.read().decode("utf-8")
failure.text = log
ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
failure.text = ansi_escape.sub('', log)
f.close()
result = ET.tostring(eleTestsuites)
f = open(filename, 'wb')