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

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: Modification based on CR comments. 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
« no previous file with comments | « media/tools/layout_tests/layouttest_analyzer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..15a3f96e0dab7b8a70864236c6df4ba3997f6074 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 compared
+ to the last result. When this is false, it sends the email out every
+ time it runs.
"""
diff_map = analyzer_result_map.CompareToOtherResultMap(
prev_analyzer_result_map)
+ # Do not email when |email_only_change_mode| is true and there is no change
+ # in the result compared to the last result.
+ if (email_only_change_mode and not any(diff_map['whole']) and
+ not any(diff_map['skip']) and not any(diff_map['nonskip'])):
+ return
output_str = analyzer_result_map.ConvertToString(prev_time,
diff_map, bug_anno_map)
# Add diff info about skipped/non-skipped test.
« no previous file with comments | « media/tools/layout_tests/layouttest_analyzer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698