Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py

Issue 2508603002: [Findit] Refactoring trigger swarming task pipelines (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 from model.flake.flake_swarming_task import FlakeSwarmingTask 5 from model.flake.flake_swarming_task import FlakeSwarmingTask
6 from waterfall import waterfall_config 6 from waterfall import waterfall_config
7 from waterfall.trigger_base_swarming_task_pipeline import( 7 from waterfall.trigger_base_swarming_task_pipeline import(
8 TriggerBaseSwarmingTaskPipeline) 8 TriggerBaseSwarmingTaskPipeline)
9 9
10 10
11 class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline): 11 class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline):
12 """A pipeline to check if selected tests of a step are flaky. 12 """A pipeline to check if selected tests of a step are flaky.
13 13
14 This pipeline only supports test steps that run on Swarming and support the 14 This pipeline only supports test steps that run on Swarming and support the
15 gtest filter. 15 gtest filter.
16 """ 16 """
17 17
18 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests):
19 test_name = tests[0] # Only one test per pipeline.
20 return (master_name, builder_name, build_number, step_name, test_name)
21
18 # pylint: disable=arguments-differ 22 # pylint: disable=arguments-differ
19 def _GetSwarmingTask(self, master_name, builder_name, build_number, 23 def _GetSwarmingTask(self, master_name, builder_name, build_number,
20 step_name, test_name): 24 step_name, test_name):
21 # Get the appropriate kind of Swarming Task (Flake). 25 # Get the appropriate kind of Swarming Task (Flake).
22 swarming_task = FlakeSwarmingTask.Get( 26 swarming_task = FlakeSwarmingTask.Get(
23 master_name, builder_name, build_number, step_name, test_name) 27 master_name, builder_name, build_number, step_name, test_name)
24 return swarming_task 28 return swarming_task
25 29
26 # pylint: disable=arguments-differ 30 # pylint: disable=arguments-differ
27 def _CreateSwarmingTask(self, master_name, builder_name, build_number, 31 def _CreateSwarmingTask(self, master_name, builder_name, build_number,
28 step_name, test_name): 32 step_name, test_name):
29 # Create the appropriate kind of Swarming Task (Flake). 33 # Create the appropriate kind of Swarming Task (Flake).
30 swarming_task = FlakeSwarmingTask.Create( 34 swarming_task = FlakeSwarmingTask.Create(
31 master_name, builder_name, build_number, step_name, test_name) 35 master_name, builder_name, build_number, step_name, test_name)
32 return swarming_task 36 return swarming_task
33 37
34 def _GetIterationsToRerun(self): 38 def _GetIterationsToRerun(self):
35 return waterfall_config.GetCheckFlakeSettings().get('iterations_to_rerun') 39 return waterfall_config.GetCheckFlakeSettings().get('iterations_to_rerun')
36
37 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests):
38 test_name = tests[0] # Only one test per pipeline.
39 return (master_name, builder_name, build_number, step_name, test_name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698