Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 from google.appengine.ext import ndb | |
| 2 | |
| 3 import logging | |
| 4 | |
| 5 from waterfall.trigger_base_swarming_task_pipeline import ( | |
| 6 TriggerBaseSwarmingTaskPipeline as TBSTP) | |
| 7 from model.flake.flake_swarming_task import FlakeSwarmingTask | |
| 8 | |
| 9 class TriggerFlakeSwarmingTaskPipeline(TBSTP): | |
| 10 """A pipeline to check if selected tests of a step are flaky. | |
| 11 | |
| 12 This pipeline only supports test steps that run on Swarming and support the | |
| 13 gtest filter. | |
| 14 """ | |
| 15 #pylint: disable=arguments-differ | |
| 16 def _GetSwarmingTask(self,master_name, builder_name, build_number, | |
| 17 step_name, test_name): | |
| 18 # Get the appropriate kind of Swarming Task (Flake). | |
| 19 swarming_task = FlakeSwarmingTask.Get( | |
| 20 master_name, builder_name, build_number, step_name, test_name) | |
| 21 return swarming_task | |
| 22 | |
| 23 #pylint: disable=arguments-differ | |
| 24 def _CreateSwarmingTask(self, master_name, builder_name, build_number, | |
| 25 step_name, test_name): | |
| 26 # Create the appropriate kind of Swarming Task (Flake). | |
| 27 swarming_task = FlakeSwarmingTask.Create( | |
| 28 master_name, builder_name, build_number, step_name, test_name) | |
| 29 return swarming_task | |
| 30 | |
| 31 def _GetIterationsToRerun(self): | |
| 32 # How many times we want to run the swarming rerun? | |
| 33 # TODO(caiw): Move to config. | |
| 34 return 10 | |
| 35 | |
| 36 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests): | |
|
stgao
2016/07/14 18:34:50
One alternative is to return the key of the entity
caiw
2016/07/15 00:25:10
I thought we talked and said this was ok for now?
| |
| 37 test_name = tests[0] #only one test per pipeline | |
| 38 logging.info("test name: %s" % test_name) | |
| 39 return (master_name, builder_name, build_number, step_name, test_name) | |
| OLD | NEW |