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..355b8afbfefd580af25fbfaa6bee13b32b40e675 100644 |
| --- a/scripts/master/factory/swarm_commands.py |
| +++ b/scripts/master/factory/swarm_commands.py |
| @@ -89,6 +89,23 @@ class SwarmShellForTriggeringTests(shell.ShellCommand): |
| swarm_tests_hash_mapping = commands.GetProp(self, 'swarm_hashes', {}) |
| command = self.command[:] |
| + |
| + # Determine the priority. (Lower the more important) There's 3 levels: |
| + # - Continuous Integration: 10 |
| + # - CQ Try Jobs: 50 |
| + # - Try Jobs: 90 |
| + # Default priority is 100 |
| + # So determine the priority. |
| + priority = 10 |
| + requester = commands.GetProp(self, 'requester', None) |
| + if requester == 'commit-bot@chromium.org': |
| + # A CQ job. |
| + priority = 50 |
| + elif requester or commands.GetProp(self, 'testfilter', None): |
| + # A try job. |
| + priority = 90 |
| + 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
|
| + |
| for swarm_test in self.tests: |
| if swarm_tests_hash_mapping.get(swarm_test.test_name): |
| command.extend( |