summaryrefslogtreecommitdiff
path: root/testing/tools/safetynet_conclusions.py
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-22 11:03:33 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-22 15:42:56 +0000
commite6f3fccc1c8c90867e0d779bf26337a0db1b1e90 (patch)
tree9d0264c8297907d46d3917eb461423bb20da9231 /testing/tools/safetynet_conclusions.py
parent39fa751f84bc226c22d65c2fc5e7d3615dfe5ddb (diff)
downloadpdfium-e6f3fccc1c8c90867e0d779bf26337a0db1b1e90.tar.xz
Prepare safetynet_job.py to have its output sent in emails
- Add --no-color option. - Fix exit code ambiguity (2 means bad usage) Change-Id: I04be9c3f21b5a71857b7847b3cc32bf595084994 Reviewed-on: https://pdfium-review.googlesource.com/11490 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'testing/tools/safetynet_conclusions.py')
-rw-r--r--testing/tools/safetynet_conclusions.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/tools/safetynet_conclusions.py b/testing/tools/safetynet_conclusions.py
index 5764ede0c5..3d8758764c 100644
--- a/testing/tools/safetynet_conclusions.py
+++ b/testing/tools/safetynet_conclusions.py
@@ -263,15 +263,15 @@ def PrintConclusionsDictHumanReadable(conclusions_dict, colored, key=None):
case_pairs = sorted(conclusions_dict['comparison_by_case'].iteritems())
for case_name, case_dict in case_pairs:
+ if colored:
+ color = RATING_TO_COLOR[case_dict['rating']]
+
if case_dict['rating'] == RATING_FAILURE:
print u'{} to measure time for {}'.format(
- RATING_TO_COLOR[RATING_FAILURE].format('Failed'),
+ color.format('Failed'),
case_name).encode('utf-8')
continue
- if colored:
- color = RATING_TO_COLOR[case_dict['rating']]
-
print u'{0} {1:15,d} {2}' .format(
color.format('{:+11.4%}'.format(case_dict['ratio'])),
case_dict['after'],