summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-10 16:47:07 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-10 22:33:37 +0000
commit8fb94e9a2d75cfbc5587c77e9d0b213f81d9b7be (patch)
treefb5560ee95ee8c04cd1e87afc61a2423a61078b2
parentf1c72de7794b309c9691c0b02b6100cdde042015 (diff)
downloadpdfium-8fb94e9a2d75cfbc5587c77e9d0b213f81d9b7be.tar.xz
Fixing utf-8 safetynet_conclusions problem when writing the json.
The previous fix (encoding on print) breaks when running compare.py directly. The real problem was in writing the json. Change-Id: Ie4cf926b5c6153731c1ae187ec6a7cffa74ce67b Reviewed-on: https://pdfium-review.googlesource.com/10653 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
-rwxr-xr-xtesting/tools/safetynet_compare.py2
-rw-r--r--testing/tools/safetynet_conclusions.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/testing/tools/safetynet_compare.py b/testing/tools/safetynet_compare.py
index e54bec5366..028dd02232 100755
--- a/testing/tools/safetynet_compare.py
+++ b/testing/tools/safetynet_compare.py
@@ -539,7 +539,7 @@ class CompareRun(object):
ComparisonConclusions.GetOutputDict().
"""
if self.args.machine_readable:
- print json.dumps(conclusions_dict)
+ print json.dumps(conclusions_dict, ensure_ascii=False)
else:
PrintConclusionsDictHumanReadable(
conclusions_dict, colored=True, key=self.args.case_order)
diff --git a/testing/tools/safetynet_conclusions.py b/testing/tools/safetynet_conclusions.py
index 0761a91043..112274e669 100644
--- a/testing/tools/safetynet_conclusions.py
+++ b/testing/tools/safetynet_conclusions.py
@@ -274,7 +274,7 @@ def PrintConclusionsDictHumanReadable(conclusions_dict, colored, key=None):
print '{0} {1:15,d} {2}' .format(
color.format('{:+11.4%}'.format(case_dict['ratio'])),
case_dict['after'],
- case_name.encode('utf-8'))
+ case_name)
# Print totals
totals = conclusions_dict['summary']