Commit 9ebcda0c authored by Ben Joyce's avatar Ben Joyce Committed by Commit Bot

Fix upload problem when with non utf-8 chars.

Bug: 1141105
Change-Id: Id80148a1ba2ec4a070bc8b3dbfe2efd8e17a7ca5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490874
Commit-Queue: benjamin joyce <bjoyce@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820001}
parent 28648dc6
......@@ -933,7 +933,11 @@ def RunTestsInPlatformMode(args, result_sink_client=None):
iteration_count += 1
for r in iteration_results.GetAll():
if result_sink_client:
result_sink_client.Post(r.GetName(), r.GetType(), r.GetLog())
# Some tests put in non utf-8 char as part of the test
# which breaks uploads, so need to decode and re-encode.
result_sink_client.Post(
r.GetName(), r.GetType(),
r.GetLog().decode('utf-8', 'replace').encode('utf-8'))
result_counts[r.GetName()][r.GetType()] += 1
report_results.LogFull(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment