Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: media/tools/layout_tests/layouttest_analyzer_helpers.py

Issue 7850023: Add a command-line option about status email in the layout test analyzer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor doc change. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/tools/layout_tests/layouttest_analyzer_helpers.py
diff --git a/media/tools/layout_tests/layouttest_analyzer_helpers.py b/media/tools/layout_tests/layouttest_analyzer_helpers.py
index fda23c6d20e19a01235f8477f6aa0f9f8d6dc39c..f9eecb5949466d3369be14c3dffd4a7aa05b4826 100644
--- a/media/tools/layout_tests/layouttest_analyzer_helpers.py
+++ b/media/tools/layout_tests/layouttest_analyzer_helpers.py
@@ -264,7 +264,7 @@ class AnalyzerResultMap:
def SendStatusEmail(prev_time, analyzer_result_map, prev_analyzer_result_map,
bug_anno_map, receiver_email_address, test_group_name,
- appended_text_to_email):
+ appended_text_to_email, email_only_change_mode):
"""Send status email.
Args:
@@ -279,9 +279,18 @@ def SendStatusEmail(prev_time, analyzer_result_map, prev_analyzer_result_map,
test_group_name: string representing the test group name (e.g., 'media').
appended_text_to_email: a text which is appended at the end of the status
email.
+ email_only_change_mode: when this is true, the analyzer sends out the
+ status email only when there is change in the analyzer result comparing
dennis_jeffrey 2011/09/09 00:56:29 'comparing' --> 'compared'
imasaki1 2011/09/09 03:03:45 Done.
+ to the last result. when this is false, it sends the email out every
dennis_jeffrey 2011/09/09 00:56:29 nit: capitalize 'w' in 'when', since it's the star
imasaki1 2011/09/09 03:03:45 Done.
+ time it runs.
"""
diff_map = analyzer_result_map.CompareToOtherResultMap(
prev_analyzer_result_map)
+ # Do not email when |email_only_change_mode| is true and no change in
dennis_jeffrey 2011/09/09 00:56:29 'no change' --> 'there is no change'
imasaki1 2011/09/09 03:03:45 Done.
+ # the result comparing to the last result.
dennis_jeffrey 2011/09/09 00:56:29 'comparing' --> 'compared'
imasaki1 2011/09/09 03:03:45 Done.
+ if email_only_change_mode and not any(diff_map['whole']) and (
dennis_jeffrey 2011/09/09 00:56:29 optional nit: I think it looks a little better to
imasaki1 2011/09/09 03:03:45 Done.
+ not any(diff_map['skip']) and not any(diff_map['nonskip'])):
+ return
dennis_jeffrey 2011/09/09 00:56:29 indent this line by 2 fewer spaces
imasaki1 2011/09/09 03:03:45 Done.
output_str = analyzer_result_map.ConvertToString(prev_time,
diff_map, bug_anno_map)
# Add diff info about skipped/non-skipped test.

Powered by Google App Engine
This is Rietveld 408576698