Chromium Code Reviews| 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(): |