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

Unified Diff: webrtc/tools/testing/utils.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
« webrtc/tools/testing/README.md ('K') | « webrtc/tools/testing/setup_apprtc.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/testing/utils.py
diff --git a/webrtc/tools/testing/utils.py b/webrtc/tools/testing/utils.py
index 7e38b42a710d605384f732c4a01b543ba2768027..3b82fc8867963cc40a98efeb45505055fd4d1140 100755
--- a/webrtc/tools/testing/utils.py
+++ b/webrtc/tools/testing/utils.py
@@ -9,7 +9,6 @@
"""Utilities for all our deps-management stuff."""
-import hashlib
import os
import shutil
import sys
@@ -34,32 +33,18 @@ def RunSubprocessWithRetry(cmd):
raise exception
-def DownloadFilesFromGoogleStorage(path):
+def DownloadFilesFromGoogleStorage(path, auto_platform=True):
print 'Downloading files in %s...' % path
extension = 'bat' if 'win32' in sys.platform else 'py'
cmd = ['download_from_google_storage.%s' % extension,
'--bucket=chromium-webrtc-resources',
- '--auto_platform',
- '--recursive',
'--directory', path]
+ if auto_platform:
+ cmd += ['--auto_platform', '--recursive']
subprocess.check_call(cmd)
-def ComputeSHA1(path):
- if not os.path.exists(path):
- return 0
-
- sha1 = hashlib.sha1()
- file_to_hash = open(path, 'rb')
- try:
- sha1.update(file_to_hash.read())
- finally:
- file_to_hash.close()
-
- return sha1.hexdigest()
-
-
# Code partially copied from
# https://cs.chromium.org#chromium/build/scripts/common/chromium_utils.py
def RemoveDirectory(*path):
« webrtc/tools/testing/README.md ('K') | « webrtc/tools/testing/setup_apprtc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698