OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Main function to run the layout test analyzer. | 6 """Main function to run the layout test analyzer. |
7 | 7 |
8 The purpose of this script is to run the layout test analyzer for various | 8 The purpose of this script is to run the layout test analyzer for various |
9 teams based on the run configuration file in CSV format. The CSV file is based | 9 teams based on the run configuration file in CSV format. The CSV file is based |
10 on https://sites.google.com/a/chromium.org/dev/developers/testing/ | 10 on https://sites.google.com/a/chromium.org/dev/developers/testing/ |
11 webkit-layout-tests/layout-test-stats-1. | 11 webkit-layout-tests/layout-test-stats-1. |
12 """ | 12 """ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 '(default to %default and no text is ' | 68 '(default to %default and no text is ' |
69 'appended in that case.)'), | 69 'appended in that case.)'), |
70 default=None) | 70 default=None) |
71 option_parser.add_option('-e', '--email-only-change-mode', | 71 option_parser.add_option('-e', '--email-only-change-mode', |
72 dest='email_only_change_mode', | 72 dest='email_only_change_mode', |
73 help=('With this mode, email is sent out ' | 73 help=('With this mode, email is sent out ' |
74 'only when there is a change in the ' | 74 'only when there is a change in the ' |
75 'analyzer result compared to the previous ' | 75 'analyzer result compared to the previous ' |
76 'result (off by default)'), | 76 'result (off by default)'), |
77 action='store_true', default=False) | 77 action='store_true', default=False) |
| 78 option_parser.add_option('-z', '--issue-detail-mode', |
| 79 dest='issue_detail_mode', |
| 80 help=('With this mode, email includes issue details' |
| 81 ' including links to the flakiness dashboard' |
| 82 ' (off by default)'), |
| 83 action='store_true', default=False) |
78 return option_parser.parse_args()[0] | 84 return option_parser.parse_args()[0] |
79 | 85 |
80 | 86 |
81 def GenerateDashboardHTMLFile(file_name, test_group_list): | 87 def GenerateDashboardHTMLFile(file_name, test_group_list): |
82 """Generate dashboard HTML file. | 88 """Generate dashboard HTML file. |
83 | 89 |
84 Currently, it is simple table that shows all the analyzer results. | 90 Currently, it is simple table that shows all the analyzer results. |
85 | 91 |
86 Args: | 92 Args: |
87 file_name: the file name of the dashboard. | 93 file_name: the file name of the dashboard. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 test_group, result_dir, graph_file, dashboard_file_location, | 193 test_group, result_dir, graph_file, dashboard_file_location, |
188 anno_file) | 194 anno_file) |
189 if run_config_map[test_group][0]: | 195 if run_config_map[test_group][0]: |
190 cmd += '-n ' + run_config_map[test_group][0] + ' ' | 196 cmd += '-n ' + run_config_map[test_group][0] + ' ' |
191 if run_config_map[test_group][1]: | 197 if run_config_map[test_group][1]: |
192 cmd += '-r ' + run_config_map[test_group][1] + ' ' | 198 cmd += '-r ' + run_config_map[test_group][1] + ' ' |
193 if options.email_appended_text_file_location: | 199 if options.email_appended_text_file_location: |
194 cmd += ' -b ' + options.email_appended_text_file_location | 200 cmd += ' -b ' + options.email_appended_text_file_location |
195 if options.email_only_change_mode: | 201 if options.email_only_change_mode: |
196 cmd += ' -c ' | 202 cmd += ' -c ' |
| 203 if options.issue_detail_mode: |
| 204 cmd += ' -z ' |
197 print 'Running ' + cmd | 205 print 'Running ' + cmd |
198 proc = Popen(cmd, shell=True) | 206 proc = Popen(cmd, shell=True) |
199 proc.communicate() | 207 proc.communicate() |
200 | 208 |
201 | 209 |
202 if '__main__' == __name__: | 210 if '__main__' == __name__: |
203 main() | 211 main() |
OLD | NEW |