| 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 common.pipeline_wrapper import BasePipeline | 5 from common.pipeline_wrapper import BasePipeline |
| 6 from common.pipeline_wrapper import pipeline | 6 from common.pipeline_wrapper import pipeline |
| 7 from common.waterfall import buildbucket_client | 7 from common.waterfall import buildbucket_client |
| 8 from model.wf_try_job import WfTryJob | 8 from model.wf_try_job import WfTryJob |
| 9 from model.wf_try_job_data import WfTryJobData | 9 from model.wf_try_job_data import WfTryJobData |
| 10 from waterfall import buildbot | 10 from waterfall import buildbot |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 'bad_revision': bad_revision, | 25 'bad_revision': bad_revision, |
| 26 'target_mastername': master_name, | 26 'target_mastername': master_name, |
| 27 'referenced_build_url': buildbot.CreateBuildUrl( | 27 'referenced_build_url': buildbot.CreateBuildUrl( |
| 28 master_name, builder_name, build_number) | 28 master_name, builder_name, build_number) |
| 29 } | 29 } |
| 30 | 30 |
| 31 if try_job_type == TryJobType.COMPILE: | 31 if try_job_type == TryJobType.COMPILE: |
| 32 properties['target_buildername'] = builder_name | 32 properties['target_buildername'] = builder_name |
| 33 if compile_targets: | 33 if compile_targets: |
| 34 properties['compile_targets'] = compile_targets | 34 properties['compile_targets'] = compile_targets |
| 35 if suspected_revisions: | |
| 36 properties['suspected_revisions'] = suspected_revisions | |
| 37 else: # try_job_type is 'test'. | 35 else: # try_job_type is 'test'. |
| 38 properties['target_testername'] = builder_name | 36 properties['target_testername'] = builder_name |
| 39 assert targeted_tests | 37 assert targeted_tests |
| 40 properties['tests'] = targeted_tests | 38 properties['tests'] = targeted_tests |
| 41 | 39 |
| 40 if suspected_revisions: |
| 41 properties['suspected_revisions'] = suspected_revisions |
| 42 |
| 42 return properties | 43 return properties |
| 43 | 44 |
| 44 # Arguments number differs from overridden method - pylint: disable=W0221 | 45 # Arguments number differs from overridden method - pylint: disable=W0221 |
| 45 def run( | 46 def run( |
| 46 self, master_name, builder_name, build_number, good_revision, | 47 self, master_name, builder_name, build_number, good_revision, |
| 47 bad_revision, try_job_type, compile_targets, targeted_tests, | 48 bad_revision, try_job_type, compile_targets, targeted_tests, |
| 48 suspected_revisions): | 49 suspected_revisions): |
| 49 tryserver_mastername, tryserver_buildername = ( | 50 tryserver_mastername, tryserver_buildername = ( |
| 50 waterfall_config.GetTrybotForWaterfallBuilder( | 51 waterfall_config.GetTrybotForWaterfallBuilder( |
| 51 master_name, builder_name)) | 52 master_name, builder_name)) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 77 try_job_data = WfTryJobData.Create(build_id) | 78 try_job_data = WfTryJobData.Create(build_id) |
| 78 try_job_data.master_name = master_name | 79 try_job_data.master_name = master_name |
| 79 try_job_data.builder_name = builder_name | 80 try_job_data.builder_name = builder_name |
| 80 try_job_data.build_number = build_number | 81 try_job_data.build_number = build_number |
| 81 try_job_data.try_job_type = try_job_type | 82 try_job_data.try_job_type = try_job_type |
| 82 try_job_data.has_compile_targets = bool(compile_targets) | 83 try_job_data.has_compile_targets = bool(compile_targets) |
| 83 try_job_data.has_heuristic_results = bool(suspected_revisions) | 84 try_job_data.has_heuristic_results = bool(suspected_revisions) |
| 84 try_job_data.put() | 85 try_job_data.put() |
| 85 | 86 |
| 86 return build_id | 87 return build_id |
| OLD | NEW |