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

Unified 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: rework 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 side-by-side diff with in-line comments
Download patch
Index: scripts/master/factory/swarm_commands.py
diff --git a/scripts/master/factory/swarm_commands.py b/scripts/master/factory/swarm_commands.py
index 89166e8f71c2283bc68c02c731a4e4dff5749515..ccd2cdacc9e0792164375f14899aef6409be140a 100644
--- a/scripts/master/factory/swarm_commands.py
+++ b/scripts/master/factory/swarm_commands.py
@@ -89,6 +89,15 @@ class SwarmShellForTriggeringTests(shell.ShellCommand):
swarm_tests_hash_mapping = commands.GetProp(self, 'swarm_hashes', {})
command = self.command[:]
+ requester = commands.GetProp(self, 'requester', None)
+ tasktype = 'ci'
Isaac (away) 2013/08/15 23:27:01 what's ci? Maybe use more descriptive names?
+ if requester == 'commit-bot@chromium.org':
+ tasktype = 'cq'
+ elif requester or commands.GetProp(self, 'testfilter', None):
+ tasktype = 'tryjob'
+ # TODO(maruel): Determine difference between CI and FYI masters.
+ command.extend(('--type', tasktype))
+
for swarm_test in self.tests:
if swarm_tests_hash_mapping.get(swarm_test.test_name):
command.extend(
@@ -119,20 +128,16 @@ class SwarmCommands(commands.FactoryCommands):
def AddTriggerSwarmTestStep(self, swarm_server, isolation_outdir, tests,
doStepIf):
assert all(t.__class__.__name__ == 'SwarmTest' for t in tests)
- script_path = self.PathJoin(
- self._swarming_client_dir, 'swarm_trigger_step.py')
-
- swarm_request_name_prefix = WithProperties('%s-%s-',
- 'buildername:-None',
- 'buildnumber:-None')
+ swarm_request_name_prefix = WithProperties(
+ '%s-%s-', 'buildername:-None', 'buildnumber:-None')
command = [
self._python,
- script_path,
- '-o', WithProperties('%s', 'target_os:-%s' % self._target_platform),
- '-u', swarm_server,
- '-t', swarm_request_name_prefix,
- '-d', isolation_outdir,
+ self.PathJoin(self._script_dir, 'trigger_swarm.py'),
+ '--os', WithProperties('%s', 'target_os:-%s' % self._target_platform),
+ '--swarming', swarm_server,
+ '--prefix', swarm_request_name_prefix,
+ '--cac', isolation_outdir,
]
assert all(i for i in command), command
self._factory.addStep(

Powered by Google App Engine
This is Rietveld 408576698