From 09a24f2b483041d6d912487743668c30e34eb023 Mon Sep 17 00:00:00 2001 From: Pavel Kartavyy Date: Tue, 15 Nov 2016 20:49:23 +0300 Subject: [PATCH] clickhouse-test: fix reading of non ascii test output --- dbms/tests/clickhouse-test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbms/tests/clickhouse-test b/dbms/tests/clickhouse-test index 212ad09f22d..859dcb088e2 100755 --- a/dbms/tests/clickhouse-test +++ b/dbms/tests/clickhouse-test @@ -137,7 +137,9 @@ def main(args): print("{0} - Timeout!".format(MSG_FAIL)) else: stdout = open(stdout_file, 'r').read() if os.path.exists(stdout_file) else '' + stdout = unicode(stdout, errors='strict', encoding='utf-8') stderr = open(stderr_file, 'r').read() if os.path.exists(stderr_file) else '' + stderr = unicode(stderr, errors='strict', encoding='utf-8') if proc.returncode != 0: failure = et.Element("failure", attrib = {"message": "return code {}".format(proc.returncode)})