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

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: 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
« no previous file with comments | « scripts/master/factory/chromium_commands.py ('k') | no next file » | 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 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(
« no previous file with comments | « scripts/master/factory/chromium_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698