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

Unified Diff: scripts/slave/get_swarm_results.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: rework 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
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()

Powered by Google App Engine
This is Rietveld 408576698