clickhouse-test: fix reading of non ascii test output

This commit is contained in:
Pavel Kartavyy 2016-11-15 20:49:23 +03:00
parent 766caff3dc
commit 09a24f2b48

View File

@ -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)})