Chromium Code Reviews| Index: appengine/findit/waterfall/schedule_try_job_pipeline.py |
| diff --git a/appengine/findit/waterfall/schedule_try_job_pipeline.py b/appengine/findit/waterfall/schedule_try_job_pipeline.py |
| index ba04f57e2aa99124ba836926cd69fad2d02951bc..71262c9115fdb4144689e473b8e8003526992a03 100644 |
| --- a/appengine/findit/waterfall/schedule_try_job_pipeline.py |
| +++ b/appengine/findit/waterfall/schedule_try_job_pipeline.py |
| @@ -10,36 +10,40 @@ from waterfall import waterfall_config |
| class ScheduleTryJobPipeline(BasePipeline): |
| - """A pipeline for scheduling a new tryjob for current build.""" |
| - |
| - def _getBuildProperties(self, recipe, master_name, builder_name, |
| - good_revision, bad_revision, compile_targets): |
| + """A pipeline for scheduling a new try job for current build.""" |
| + def _getBuildProperties( |
| + self, master_name, builder_name, good_revision, bad_revision, |
| + try_job_type, compile_targets, targeted_tests): |
| properties = { |
| - 'recipe': recipe, |
| + 'recipe': 'findit/chromium/%s' % try_job_type, |
| 'good_revision': good_revision, |
| 'bad_revision': bad_revision, |
| - 'target_mastername': master_name, |
| - 'target_buildername': builder_name |
| + 'target_mastername': master_name |
| } |
| - if compile_targets: |
| - properties['compile_targets'] = compile_targets |
| + if try_job_type == 'compile': |
| + properties['target_buildername'] = builder_name |
| + if compile_targets: |
| + properties['compile_targets'] = compile_targets |
| + else: # try_job_type is 'test'. |
| + properties['target_testername'] = builder_name |
| + if targeted_tests: |
|
stgao
2016/01/26 00:51:41
For test failures, we will always require the ``ta
chanli
2016/01/27 18:49:55
Done.
|
| + properties['tests'] = targeted_tests |
| return properties |
| # Arguments number differs from overridden method - pylint: disable=W0221 |
| def run( |
| - self, master_name, builder_name, build_number, |
| - good_revision, bad_revision, compile_targets): |
| + self, master_name, builder_name, build_number, good_revision, |
| + bad_revision, try_job_type, compile_targets, targeted_tests): |
| tryserver_mastername, tryserver_buildername = ( |
| waterfall_config.GetTrybotForWaterfallBuilder( |
| master_name, builder_name)) |
| - recipe = 'findit/chromium/compile' |
| properties = self._getBuildProperties( |
| - recipe, master_name, builder_name, good_revision, bad_revision, |
| - compile_targets) |
| + master_name, builder_name, good_revision, bad_revision, |
| + try_job_type, compile_targets, targeted_tests) |
| try_job = buildbucket_client.TryJob( |
| tryserver_mastername, tryserver_buildername, None, properties, []) |
| @@ -50,7 +54,10 @@ class ScheduleTryJobPipeline(BasePipeline): |
| 'Error "%s" occurred. Reason: "%s"' % (error.message, error.reason)) |
| try_job_result = WfTryJob.Get(master_name, builder_name, build_number) |
| - try_job_result.compile_results.append({'try_job_id': build.id}) |
| + if try_job_type == 'compile': |
| + try_job_result.compile_results.append({'try_job_id': build.id}) |
| + else: |
| + try_job_result.test_results.append({'try_job_id': build.id}) |
| try_job_result.put() |
| return build.id |