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

Unified Diff: scripts/slave/swarming/get_swarm_results.py

Issue 22909021: Add build slave side support for the new swarming.py script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fixes 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 | « no previous file | scripts/slave/swarming/swarming_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/swarming/get_swarm_results.py
diff --git a/scripts/slave/swarming/get_swarm_results.py b/scripts/slave/swarming/get_swarm_results.py
index 57eb7e7f324be5a72967e4063d35703df658ea9c..b5d8c13d7a19e6dfb3779f644e2b9702d7d2a573 100755
--- a/scripts/slave/swarming/get_swarm_results.py
+++ b/scripts/slave/swarming/get_swarm_results.py
@@ -19,8 +19,9 @@ from common import gtest_utils
from slave.swarming import swarming_utils
-# From depot tools/
+# From depot_tools/
import fix_encoding
+import subprocess2
NO_OUTPUT_FOUND = (
@@ -123,12 +124,30 @@ def v0(client, options, test_name):
return exit_code
+def v0_1(client, options, test_name):
+ """Code starting around r218375.
+
+ TODO(maruel): Put exact revision once committe.d
+ """
+ swarming = os.path.join(client, 'swarming.py')
+ return subprocess2.call(
M-A Ruel 2013/08/20 20:22:35 In practice, this means https://codereview.chromiu
+ [
+ sys.executable,
+ swarming,
+ 'collect',
+ '--swarming', options.swarming,
+ test_name,
+ ])
+
+
def determine_version_and_run_handler(client, options, test_name):
"""Executes the proper handler based on the code layout and --version
support.
"""
- # TODO(maruel): Determine version when needed.
- return v0(client, options, test_name)
+ if os.path.isfile(os.path.join(client, 'swarm_get_results.py')):
+ # Oh, that's old.
+ return v0(client, options, test_name)
+ return v0_1(client, options, test_name)
def main():
« no previous file with comments | « no previous file | scripts/slave/swarming/swarming_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698