summaryrefslogtreecommitdiff
path: root/testing/tools/safetynet_conclusions.py
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-15 14:37:58 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 20:02:20 +0000
commit0da39e6b62fe7dc0f40d5242325b3b2d5b2c9d96 (patch)
treed7d63a35b983e3c3b8a865c0fc97c9d762e74649 /testing/tools/safetynet_conclusions.py
parent5f7b8f4038d16d224cb070f08112aba5331bd094 (diff)
downloadpdfium-0da39e6b62fe7dc0f40d5242325b3b2d5b2c9d96.tar.xz
Make errors in called processes more evident and easier to debug.
Also trying to get unicode filenames right again. Change-Id: I501c94921b92b8a8cd6a10441aff1595fc6d878e Reviewed-on: https://pdfium-review.googlesource.com/10630 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing/tools/safetynet_conclusions.py')
-rw-r--r--testing/tools/safetynet_conclusions.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/testing/tools/safetynet_conclusions.py b/testing/tools/safetynet_conclusions.py
index 112274e669..5764ede0c5 100644
--- a/testing/tools/safetynet_conclusions.py
+++ b/testing/tools/safetynet_conclusions.py
@@ -179,7 +179,7 @@ class ComparisonConclusions(object):
output_dict['params'] = {'threshold': self.threshold_significant}
output_dict['summary'] = self.summary.GetOutputDict()
output_dict['comparison_by_case'] = {
- cr.case_name: cr.GetOutputDict()
+ cr.case_name.decode('utf-8'): cr.GetOutputDict()
for cr in self.GetCaseResults().values()
}
return output_dict
@@ -264,17 +264,18 @@ def PrintConclusionsDictHumanReadable(conclusions_dict, colored, key=None):
for case_name, case_dict in case_pairs:
if case_dict['rating'] == RATING_FAILURE:
- print '%s to measure time for %s' % (
- RATING_TO_COLOR[RATING_FAILURE].format('Failed'), case_name)
+ print u'{} to measure time for {}'.format(
+ RATING_TO_COLOR[RATING_FAILURE].format('Failed'),
+ case_name).encode('utf-8')
continue
if colored:
color = RATING_TO_COLOR[case_dict['rating']]
- print '{0} {1:15,d} {2}' .format(
+ print u'{0} {1:15,d} {2}' .format(
color.format('{:+11.4%}'.format(case_dict['ratio'])),
case_dict['after'],
- case_name)
+ case_name).encode('utf-8')
# Print totals
totals = conclusions_dict['summary']