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

Unified Diff: webrtc/tools/testing/build_apprtc.py

Issue 2882073003: Update testing tools (AppRTC, Go) to new versions (Closed)
Patch Set: Move readme Created 3 years, 7 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: webrtc/tools/testing/build_apprtc.py
diff --git a/webrtc/tools/testing/build_apprtc_collider.py b/webrtc/tools/testing/build_apprtc.py
similarity index 67%
rename from webrtc/tools/testing/build_apprtc_collider.py
rename to webrtc/tools/testing/build_apprtc.py
index 5ff09bbeab5539ac5b24fa245369227d44aa24c6..a390c94f0ec28d3e28af8da61a525574bb25ab5e 100755
--- a/webrtc/tools/testing/build_apprtc_collider.py
+++ b/webrtc/tools/testing/build_apprtc.py
@@ -9,11 +9,11 @@
"""Builds the AppRTC collider using the golang toolchain.
-The golang toolchain is downloaded by download_golang.py. We use that here
+The golang toolchain is downloaded by download_apprtc.py. We use that here
to build the AppRTC collider server.
This script needs to know the path to the 'src' directory in apprtc, the
-root directory of 'go', the root directory of 'hg' and the output_dir.
+root directory of 'go' and the output_dir.
"""
import os
@@ -24,35 +24,30 @@ import sys
import utils
-USAGE_STR = "Usage: {} <apprtc_src_dir> <go_dir> <hg_dir> <output_dir>"
+USAGE_STR = "Usage: {} <apprtc_src_dir> <go_dir> <output_dir>"
def main(argv):
- if len(argv) != 5:
+ if len(argv) != 4:
return USAGE_STR.format(argv[0])
- apprtc_dir = argv[1]
- go_root_dir = argv[2]
- mercurial_dir = argv[3]
- golang_workspace = argv[4]
+ apprtc_dir = os.path.abspath(argv[1])
+ go_root_dir = os.path.abspath(argv[2])
+ golang_workspace = os.path.abspath(argv[3])
utils.RemoveDirectory(golang_workspace)
golang_workspace_src = os.path.join(golang_workspace, 'src')
collider_dir = os.path.join(apprtc_dir, 'collider')
- shutil.copytree(collider_dir, golang_workspace_src,
- ignore=shutil.ignore_patterns('.svn', '.git'))
+ shutil.copytree(collider_dir, golang_workspace_src)
golang_binary = 'go%s' % ('.exe' if utils.GetPlatform() == 'win' else '')
golang_path = os.path.join(go_root_dir, 'bin', golang_binary)
golang_env = os.environ.copy()
golang_env['GOROOT'] = go_root_dir
- golang_env['GOPATH'] = os.path.abspath(golang_workspace)
- golang_env['PATH'] += os.pathsep + mercurial_dir
- subprocess.check_call([golang_path, 'get', 'collidermain'],
- env=golang_env)
+ golang_env['GOPATH'] = golang_workspace
collider_exec = os.path.join(golang_workspace, 'collidermain')
subprocess.check_call([golang_path, 'build', '-o', collider_exec,
'collidermain'], env=golang_env)

Powered by Google App Engine
This is Rietveld 408576698