| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from common.pipeline_wrapper import BasePipeline | 7 from common.pipeline_wrapper import BasePipeline |
| 8 from common.waterfall import failure_type | 8 from common.waterfall import failure_type |
| 9 from waterfall import try_job_util | 9 from waterfall import try_job_util |
| 10 from waterfall.identify_try_job_culprit_pipeline import ( | 10 from waterfall.identify_try_job_culprit_pipeline import ( |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 bad_revision = failure_info['builds'][str(build_number)][ | 92 bad_revision = failure_info['builds'][str(build_number)][ |
| 93 'chromium_revision'] | 93 'chromium_revision'] |
| 94 suspected_revisions = _GetSuspectsFromHeuristicResult(heuristic_result) | 94 suspected_revisions = _GetSuspectsFromHeuristicResult(heuristic_result) |
| 95 | 95 |
| 96 if try_job_type == failure_type.COMPILE: | 96 if try_job_type == failure_type.COMPILE: |
| 97 compile_targets = try_job_util.GetFailedTargetsFromSignals( | 97 compile_targets = try_job_util.GetFailedTargetsFromSignals( |
| 98 signals, master_name, builder_name) | 98 signals, master_name, builder_name) |
| 99 try_job_id = yield ScheduleCompileTryJobPipeline( | 99 try_job_id = yield ScheduleCompileTryJobPipeline( |
| 100 master_name, builder_name, build_number, good_revision, bad_revision, | 100 master_name, builder_name, build_number, good_revision, bad_revision, |
| 101 try_job_type, compile_targets, suspected_revisions) | 101 try_job_type, compile_targets, suspected_revisions) |
| 102 try_job_result = yield MonitorTryJobPipeline( | |
| 103 master_name, builder_name, build_number, try_job_type, try_job_id) | |
| 104 yield IdentifyTryJobCulpritPipeline( | |
| 105 master_name, builder_name, build_number, blame_list, try_job_type, | |
| 106 try_job_id, try_job_result) | |
| 107 else: | 102 else: |
| 108 # If try_job_type is other type, the pipeline has returned. | 103 # If try_job_type is other type, the pipeline has returned. |
| 109 # So here the try_job_type is failure_type.TEST. | 104 # So here the try_job_type is failure_type.TEST. |
| 110 | 105 |
| 111 # Waits and gets the swarming tasks' results. | 106 # Waits and gets the swarming tasks' results. |
| 112 reliable_tests = [] | 107 reliable_tests = [] |
| 113 for step_name, step_failure in failure_info['failed_steps'].iteritems(): | 108 for step_name, step_failure in failure_info['failed_steps'].iteritems(): |
| 114 step_has_first_time_failure = _HasFirstTimeFailure( | 109 step_has_first_time_failure = _HasFirstTimeFailure( |
| 115 step_failure['tests'], build_number) | 110 step_failure['tests'], build_number) |
| 116 if not step_has_first_time_failure: | 111 if not step_has_first_time_failure: |
| 117 continue | 112 continue |
| 118 task_result = yield ProcessSwarmingTaskResultPipeline( | 113 task_result = yield ProcessSwarmingTaskResultPipeline( |
| 119 master_name, builder_name, build_number, step_name) | 114 master_name, builder_name, build_number, step_name) |
| 120 reliable_tests.append(task_result) | 115 reliable_tests.append(task_result) |
| 121 | 116 |
| 122 try_job_id = yield ScheduleTestTryJobPipeline( | 117 try_job_id = yield ScheduleTestTryJobPipeline( |
| 123 master_name, builder_name, build_number, good_revision, bad_revision, | 118 master_name, builder_name, build_number, good_revision, bad_revision, |
| 124 try_job_type, suspected_revisions, *reliable_tests) | 119 try_job_type, suspected_revisions, *reliable_tests) |
| 125 try_job_result = yield MonitorTryJobPipeline( | 120 |
| 126 master_name, builder_name, build_number, try_job_type, try_job_id) | 121 try_job_result = yield MonitorTryJobPipeline( |
| 127 yield IdentifyTryJobCulpritPipeline( | 122 master_name, builder_name, build_number, try_job_type, try_job_id) |
| 128 master_name, builder_name, build_number, blame_list, try_job_type, | 123 yield IdentifyTryJobCulpritPipeline( |
| 129 try_job_id, try_job_result) | 124 master_name, builder_name, build_number, blame_list, try_job_type, |
| 125 try_job_id, try_job_result) |
| OLD | NEW |