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

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

Issue 10035003: Split up Each Swarm Test into Two Steps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 8 years, 8 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
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
10 from buildbot.steps import shell
11
9 from master.factory import commands 12 from master.factory import commands
10
11 from master.log_parser import gtest_command 13 from master.log_parser import gtest_command
12 14
13 class SwarmCommands(commands.FactoryCommands): 15 class SwarmCommands(commands.FactoryCommands):
14 """Encapsulates methods to add swarm commands to a buildbot factory""" 16 """Encapsulates methods to add swarm commands to a buildbot factory"""
15 17
16 def AddSwarmTestStep(self, target_platform, swarm_server, swarm_port, 18 def AddSendSwarmTestStep(self, target_platform, swarm_server,
M-A Ruel 2012/04/17 20:16:00 I'd prefer "Trigger" to "Send". It is more meaning
csharp 2012/04/18 18:20:29 Done.
17 min_shards, max_shards, manifest_file, test_name): 19 swarm_port, min_shards, max_shards,
M-A Ruel 2012/04/17 20:16:00 weird alignment.
csharp 2012/04/18 18:20:29 Done.
20 manifest_files, test_names):
18 script_path = self.PathJoin(self._script_dir, 'run_slavelastic.py') 21 script_path = self.PathJoin(self._script_dir, 'run_slavelastic.py')
19 22
20 command = [self._python, script_path, '-m', min_shards, '-s', max_shards, 23 # TODO(csharp) Merge into a single command
21 '-o', target_platform, '-n', swarm_server, 24 for i in range(len(manifest_files)):
22 '-p', swarm_port, manifest_file] 25 swarm_request_name = WithProperties('%s-%s-' + test_names[i],
26 'buildername:-None',
27 'buildnumber:-None')
28
29 command = [self._python, script_path, '-m', min_shards, '-s', max_shards,
30 '-o', target_platform, '-n', swarm_server,
31 '-p', swarm_port, '-t', swarm_request_name, manifest_files[i]]
32
33 self.AddTestStep(shell.ShellCommand,
34 '%s_swarm' % test_names[i],
35 command)
36
37 def AddGetSwarmTestStep(self, swarm_server, swarm_port, test_name):
38 script_path = self.PathJoin(self._script_dir, 'get_swarm_results.py')
39
40 swarm_request_name = WithProperties('%s-%s-' + test_name,
41 'buildername:-None',
42 'buildnumber:-None')
43
44 command = [self._python, script_path, '-n', swarm_server, '-p', swarm_port,
45 swarm_request_name]
23 46
24 self.AddTestStep(gtest_command.GTestCommand, 47 self.AddTestStep(gtest_command.GTestCommand,
25 '%s_swarm' % test_name, 48 '%s_swarm' % test_name,
26 command) 49 command)
OLDNEW
« no previous file with comments | « no previous file | scripts/master/factory/swarm_factory.py » ('j') | scripts/master/factory/swarm_factory.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698