sanitycheck: encode logs correctly

We were encoding logs twice.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-12-29 22:09:03 -05:00 committed by Anas Nashif
commit 712d34513e

View file

@ -1945,11 +1945,9 @@ class TestSuite:
bl = os.path.join(p, "qemu.log")
if os.path.exists(bl):
with open(bl, "r") as f:
log = f.read()
ansi_escape = re.compile(r'\x1b[^m]*m')
output = ansi_escape.sub('', str(log))
failure.text = (escape(output))
with open(bl, "rb") as f:
log = f.read().decode("utf-8")
failure.text = log
result = ET.tostring(eleTestsuites)
f = open(filename, 'wb')