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

Side by Side Diff: scripts/slave/swarming/swarming_utils.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: Had forgot to append _shim to one comment Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Code to find swarming_client.""" 6 """Code to find swarming_client."""
7 7
8 import os 8 import os
9 9
10 10
11 def find_client(base_dir): 11 def find_client(base_dir):
12 """Returns the path to swarming_client if found.""" 12 """Returns the path to swarming_client if found.
13
14 |base_dir| will be in general os.getcwd(), so the script is very dependent on
15 CWD. CWD should be the base directory of the checkout. It has always been the
16 case.
17 """
13 src_swarming_client = os.path.join( 18 src_swarming_client = os.path.join(
14 base_dir, 'src', 'tools', 'swarming_client') 19 base_dir, 'src', 'tools', 'swarming_client')
15 if os.path.isdir(src_swarming_client): 20 if os.path.isdir(src_swarming_client):
16 return src_swarming_client 21 return src_swarming_client
17 22
18 # This is the previous path. This can be removed around 2013-12-01. 23 # This is the previous path. This can be removed around 2013-12-01.
19 src_swarm_client = os.path.join(base_dir, 'src', 'tools', 'swarm_client') 24 src_swarm_client = os.path.join(base_dir, 'src', 'tools', 'swarm_client')
20 if os.path.isdir(src_swarm_client): 25 if os.path.isdir(src_swarm_client):
21 return src_swarm_client 26 return src_swarm_client
OLDNEW
« no previous file with comments | « scripts/slave/swarming/get_swarm_results_shim.py ('k') | scripts/slave/swarming/trigger_swarm_shim.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698