Commit 19143057 authored by Anas Nashif's avatar Anas Nashif Committed by Anas Nashif
Browse files

sanitycheck: encode logs correctly

We were encoding logs twice.

Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent 69cf4c52
Loading
Loading
Loading
Loading
+3 −5
Changes for scripts/sanitycheck: 3 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -1794,11 +1794,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')