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

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

Issue 7789008: Added an option to append text at the end of the status email n layout test analyzer tool. (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 | « no previous file | media/tools/layout_tests/layouttest_analyzer_helpers.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/layout_tests/layouttest_analyzer.py
diff --git a/media/tools/layout_tests/layouttest_analyzer.py b/media/tools/layout_tests/layouttest_analyzer.py
index b7045a689b41fc996e0f92b8e2264034b23e9608..60b688edba1757301d8002f207ee7d44e38f5110 100644
--- a/media/tools/layout_tests/layouttest_analyzer.py
+++ b/media/tools/layout_tests/layouttest_analyzer.py
@@ -79,6 +79,13 @@ def parse_option():
help=('Name of result directory location '
'(default to %default)'),
default=DEFAULT_RESULT_DIR)
+ option_parser.add_option('-b', '--email-appended-text-file-location',
+ dest='email_appended_text_file_location',
+ help=('File location of the email appended text. '
+ 'The text is appended in the status email. '
+ '(default to %default and no text is '
+ 'appended in that case.)'),
+ default=None)
return option_parser.parse_args()[0]
@@ -105,17 +112,35 @@ def main():
# Read bug annotations and generate an annotation map used for the status
# email.
anno_map = {}
- file_object = open(options.bug_annotation_file_location)
- data = csv.reader(file_object)
- for row in data:
- anno_map[row[0]] = row[1]
- file_object.close()
+ try:
+ file_object = open(options.bug_annotation_file_location)
+ except IOError:
+ print 'cannot open annotation file %s. Skipping.' % (
+ options.bug_annotation_file_location)
+ else:
+ data = csv.reader(file_object)
+ for row in data:
+ anno_map[row[0]] = row[1]
+ file_object.close()
+
+ appended_text_to_email = ''
+ if options.email_appended_text_file_location:
+ try:
+ file_object = open(options.email_appended_text_file_location)
+ except IOError:
+ print 'cannot open email appended text file %s. Skipping.' % (
+ options.email_appended_text_file_location)
+ else:
+ appended_text_to_email = ''.join(file_object.readlines())
+ file_object.close()
+
layouttest_analyzer_helpers.SendStatusEmail(prev_time, analyzer_result_map,
prev_analyzer_result_map,
anno_map,
options.receiver_email_address,
- options.test_group_name)
+ options.test_group_name,
+ appended_text_to_email)
if not options.debug:
# Save the current result.
date = start_time.strftime('%Y-%m-%d-%H')
« no previous file with comments | « no previous file | media/tools/layout_tests/layouttest_analyzer_helpers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698