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

Side by Side Diff: scripts/master/factory/swarm_commands.py

Issue 23176003: Create proper wrapper scripts to decouple from swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « scripts/master/factory/chromium_commands.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Set of utilities to add commands to a buildbot factory. 5 """Set of utilities to add commands to a buildbot factory.
6 6
7 This is based on commands.py and adds swarm-specific commands.""" 7 This is based on commands.py and adds swarm-specific commands."""
8 8
9 from buildbot.process.properties import WithProperties 9 from buildbot.process.properties import WithProperties
10 from buildbot.steps import shell, source 10 from buildbot.steps import shell, source
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 'swarm_hashes' is already related to GetSwarmTests(). 82 'swarm_hashes' is already related to GetSwarmTests().
83 """ 83 """
84 # Only used for pass gtest filters specified by the user via 'testfilter'. 84 # Only used for pass gtest filters specified by the user via 'testfilter'.
85 swarm_tests = commands.GetSwarmTests(self) 85 swarm_tests = commands.GetSwarmTests(self)
86 # The 'swarm_hashes' build property has been set by the 86 # The 'swarm_hashes' build property has been set by the
87 # CalculateIsolatedSha1s build step. It will have all the steps that can be 87 # CalculateIsolatedSha1s build step. It will have all the steps that can be
88 # triggered. This implicitly takes account 'testfilter'. 88 # triggered. This implicitly takes account 'testfilter'.
89 swarm_tests_hash_mapping = commands.GetProp(self, 'swarm_hashes', {}) 89 swarm_tests_hash_mapping = commands.GetProp(self, 'swarm_hashes', {})
90 90
91 command = self.command[:] 91 command = self.command[:]
92
93 # Determine the priority. (Lower the more important) There's 3 levels:
94 # - Continuous Integration: 10
95 # - CQ Try Jobs: 50
96 # - Try Jobs: 90
97 # Default priority is 100
98 # So determine the priority.
99 priority = 10
100 requester = commands.GetProp(self, 'requester', None)
101 if requester == 'commit-bot@chromium.org':
102 # A CQ job.
103 priority = 50
104 elif requester or commands.GetProp(self, 'testfilter', None):
105 # A try job.
106 priority = 90
107 command.extend(('--priority', str(priority)))
Isaac (away) 2013/08/14 20:23:18 Is there a way to move this logic to a slaves scri
108
92 for swarm_test in self.tests: 109 for swarm_test in self.tests:
93 if swarm_tests_hash_mapping.get(swarm_test.test_name): 110 if swarm_tests_hash_mapping.get(swarm_test.test_name):
94 command.extend( 111 command.extend(
95 [ 112 [
96 '--run_from_hash', 113 '--run_from_hash',
97 swarm_tests_hash_mapping[swarm_test.test_name], 114 swarm_tests_hash_mapping[swarm_test.test_name],
98 swarm_test.test_name, 115 swarm_test.test_name,
99 '%d' % swarm_test.shards, 116 '%d' % swarm_test.shards,
100 # '*' is a special value to mean no filter. This is used so '' is 117 # '*' is a special value to mean no filter. This is used so '' is
101 # not used, as '' may be misinterpreted by the shell, especially 118 # not used, as '' may be misinterpreted by the shell, especially
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 241
225 command = [self._python, script_path, '--drive', drive, 242 command = [self._python, script_path, '--drive', drive,
226 '--network_path', network_path] 243 '--network_path', network_path]
227 244
228 self._factory.addStep( 245 self._factory.addStep(
229 shell.ShellCommand, 246 shell.ShellCommand,
230 name='setup_windows_network_storage', 247 name='setup_windows_network_storage',
231 description='setup_windows_network_storage', 248 description='setup_windows_network_storage',
232 descriptionDone='setup_windows_network_storage', 249 descriptionDone='setup_windows_network_storage',
233 command=command) 250 command=command)
OLDNEW
« no previous file with comments | « scripts/master/factory/chromium_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698