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

Unified 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: Renaming broken test :( 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « masters/master.chromium.swarm/master.cfg ('k') | scripts/master/factory/swarm_factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/factory/swarm_commands.py
diff --git a/scripts/master/factory/swarm_commands.py b/scripts/master/factory/swarm_commands.py
index 1d3a66a424dcec7cfc3a1b75731b43037b27de43..64e67c0a637c99859457ada7f717f37acdfb5344 100644
--- a/scripts/master/factory/swarm_commands.py
+++ b/scripts/master/factory/swarm_commands.py
@@ -6,20 +6,43 @@
This is based on commands.py and adds swarm-specific commands."""
-from master.factory import commands
+from buildbot.process.properties import WithProperties
+from buildbot.steps import shell
+from master.factory import commands
from master.log_parser import gtest_command
class SwarmCommands(commands.FactoryCommands):
"""Encapsulates methods to add swarm commands to a buildbot factory"""
- def AddSwarmTestStep(self, target_platform, swarm_server, swarm_port,
- min_shards, max_shards, manifest_file, test_name):
+ def AddTriggerSwarmTestStep(self, target_platform, swarm_server,
+ min_shards, max_shards,
+ manifest_files, test_names):
script_path = self.PathJoin(self._script_dir, 'run_slavelastic.py')
- command = [self._python, script_path, '-m', min_shards, '-s', max_shards,
- '-o', target_platform, '-n', swarm_server,
- '-p', swarm_port, manifest_file]
+ # TODO(csharp) Merge into a single command
+ for i in range(len(manifest_files)):
+ swarm_request_name = WithProperties('%s-%s-' + test_names[i],
+ 'buildername:-None',
+ 'buildnumber:-None')
+
+ command = [self._python, script_path, '-m', min_shards, '-s', max_shards,
+ '-o', target_platform, '-u', swarm_server,
+ '-t', swarm_request_name, manifest_files[i]]
+
+ self.AddTestStep(shell.ShellCommand,
+ '%s_swarm' % test_names[i],
+ command)
+
+ def AddGetSwarmTestStep(self, swarm_server, test_name):
+ script_path = self.PathJoin(self._script_dir, 'get_swarm_results.py')
+
+ swarm_request_name = WithProperties('%s-%s-' + test_name,
+ 'buildername:-None',
+ 'buildnumber:-None')
+
+ command = [self._python, script_path, '-u', swarm_server,
+ swarm_request_name]
self.AddTestStep(gtest_command.GTestCommand,
'%s_swarm' % test_name,
« no previous file with comments | « masters/master.chromium.swarm/master.cfg ('k') | scripts/master/factory/swarm_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698