Chromium Code Reviews| 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..e71e32b2168e9fd15a9fa2e09f2e8476c9b48385 100644 |
| --- a/scripts/master/factory/swarm_commands.py |
| +++ b/scripts/master/factory/swarm_commands.py |
| @@ -89,6 +89,18 @@ class SwarmShellForTriggeringTests(shell.ShellCommand): |
| swarm_tests_hash_mapping = commands.GetProp(self, 'swarm_hashes', {}) |
| command = self.command[:] |
| + requester = commands.GetProp(self, 'requester', None) |
| + # 'ci' means Continuous Integration and it's jobs that are meant to test |
| + # code that has just been committed but yet tested. That's what most people |
| + # call 'the waterfall' or the 'main master'. |
| + tasktype = 'ci' |
| + 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 +131,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( |
|
Isaac (away)
2013/08/20 22:22:33
While this is OK, the preferred style is probably
|
| + '%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, |
| + '--task-prefix', swarm_request_name_prefix, |
| + '--isolate-server', isolation_outdir, |
| ] |
| assert all(i for i in command), command |
| self._factory.addStep( |
| @@ -153,7 +161,11 @@ class SwarmCommands(commands.FactoryCommands): |
| 'buildername:-None', |
| 'buildnumber:-None') |
| - args = ['-u', swarm_server, '-s', '%d' % num_shards, swarm_request_name] |
| + args = [ |
| + '--swarming', swarm_server, |
| + '--shards', '%d' % num_shards, |
| + swarm_request_name, |
| + ] |
| wrapper_args = [ |
| '--no-xvfb', '--annotate=gtest', '--test-type=%s' % test_name, |
| ] |