| Index: scripts/slave/get_swarm_results.py
|
| diff --git a/scripts/slave/get_swarm_results.py b/scripts/slave/get_swarm_results.py
|
| index 162fe1203818d747762160a2f19c8a48d44bf880..ea5c15915a27c2c163cd6c6934f091587f2f3f10 100755
|
| --- a/scripts/slave/get_swarm_results.py
|
| +++ b/scripts/slave/get_swarm_results.py
|
| @@ -14,6 +14,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
| from common import find_depot_tools # pylint: disable=W0611
|
| from common import gtest_utils
|
| +from slave import trigger_swarm
|
|
|
| # From depot tools/
|
| import fix_encoding
|
| @@ -103,21 +104,14 @@ def GetSwarmResults(
|
|
|
|
|
| def main():
|
| - src_swarming_client = os.path.join(
|
| - os.getcwd(), 'src', 'tools', 'swarming_client')
|
| -
|
| - # This is the previous path. This can be removed around 2013-12-01.
|
| - src_swarm_client = os.path.join(os.getcwd(), 'src', 'tools', 'swarm_client')
|
| -
|
| - if os.path.isdir(src_swarming_client):
|
| - sys.path.insert(0, src_swarming_client)
|
| - elif os.path.isdir(src_swarm_client):
|
| - sys.path.insert(0, src_swarm_client)
|
| - else:
|
| - print >> sys.stderr, 'Failed to find swarm_client at %s or %s' % (
|
| - src_swarming_client, src_swarm_client)
|
| + client = trigger_swarm.find_swarming_client()
|
| + if not client:
|
| + print >> sys.stderr, 'Failed to find swarm(ing)_client'
|
| return 1
|
|
|
| + # TODO(maruel): Do not import, reproduce the same flags and forward to a
|
| + # subprocess.call() instead.
|
| + sys.path.insert(0, client)
|
| import swarm_get_results # pylint: disable=F0401
|
|
|
| parser, options, test_name = swarm_get_results.parse_args()
|
|
|