OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from collections import defaultdict | 5 from collections import defaultdict |
6 import os | 6 import os |
7 import re | 7 import re |
8 | 8 |
9 from common.diff import ChangeType | 9 from lib.gitiles.diff import ChangeType |
10 from common.git_repository import GitRepository | 10 from lib.gitiles.git_repository import GitRepository |
11 from common.http_client_appengine import HttpClientAppengine as HttpClient | 11 from common.http_client_appengine import HttpClientAppengine as HttpClient |
12 from waterfall import waterfall_config | 12 from waterfall import waterfall_config |
13 from waterfall.failure_signal import FailureSignal | 13 from waterfall.failure_signal import FailureSignal |
14 | 14 |
15 | 15 |
16 def _IsSameFile(changed_src_file_path, file_path_in_log): | 16 def _IsSameFile(changed_src_file_path, file_path_in_log): |
17 """Guesses if the two files are the same. | 17 """Guesses if the two files are the same. |
18 | 18 |
19 Args: | 19 Args: |
20 changed_src_file_path (str): Full path of a file committed to git repo. | 20 changed_src_file_path (str): Full path of a file committed to git repo. |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 if not is_test_level: | 798 if not is_test_level: |
799 _SaveFailureToMap( | 799 _SaveFailureToMap( |
800 cl_failure_map, new_suspected_cl_dict, step_name, None, | 800 cl_failure_map, new_suspected_cl_dict, step_name, None, |
801 max(justification_dict['hints'].values())) | 801 max(justification_dict['hints'].values())) |
802 | 802 |
803 # TODO(stgao): sort CLs by score. | 803 # TODO(stgao): sort CLs by score. |
804 analysis_result['failures'].append(step_analysis_result) | 804 analysis_result['failures'].append(step_analysis_result) |
805 | 805 |
806 suspected_cls = _ConvertCLFailureMapToList(cl_failure_map) | 806 suspected_cls = _ConvertCLFailureMapToList(cl_failure_map) |
807 | 807 |
808 return analysis_result, suspected_cls | 808 return analysis_result, suspected_cls |
OLD | NEW |