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

Unified Diff: tools-webrtc/download.py

Issue 2715933003: Add PESQ precompiled tool for audio quality testing (Closed)
Patch Set: Created 3 years, 10 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: tools-webrtc/download.py
diff --git a/tools-webrtc/video_quality_toolchain/download.py b/tools-webrtc/download.py
similarity index 54%
rename from tools-webrtc/video_quality_toolchain/download.py
rename to tools-webrtc/download.py
index 24c243af15c698686f1fa5e3cd4d3820d35aa3d5..6c5140e8375c77c8783726995404ad5d0c682094 100755
--- a/tools-webrtc/video_quality_toolchain/download.py
+++ b/tools-webrtc/download.py
@@ -7,7 +7,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-"""Downloads precompiled tools needed for video quality analysis."""
+"""Downloads precompiled tools."""
kjellander_webrtc 2017/03/03 04:33:56 Since this script is now more visible in the new l
oprypin_webrtc 2017/03/03 19:24:50 Done.
import os
import subprocess
@@ -17,19 +17,23 @@ import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-def main():
- cmd = [
- 'download_from_google_storage',
- '--directory',
- '--num_threads=10',
- '--bucket', 'chrome-webrtc-resources',
- '--auto_platform',
- '--recursive',
- SCRIPT_DIR,
- ]
- print 'Downloading video quality analysis tools...'
- subprocess.check_call(cmd)
+def main(directories):
+ if not directories:
+ directories = [SCRIPT_DIR]
+
+ for path in directories:
+ cmd = [
+ 'download_from_google_storage',
+ '--directory',
+ '--num_threads=10',
+ '--bucket', 'chrome-webrtc-resources',
+ '--auto_platform',
+ '--recursive',
+ path,
kjellander_webrtc 2017/02/27 07:05:13 Skip the directory handling in main() + the loop a
oprypin_webrtc 2017/03/02 17:30:08 This is done so each test can specify what subdire
kjellander_webrtc 2017/03/03 04:33:56 Sure, that could be a useful feature as it works b
oprypin_webrtc 2017/03/03 19:24:50 Done.
+ ]
+ print 'Downloading precompiled tools...'
+ subprocess.check_call(cmd)
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))

Powered by Google App Engine
This is Rietveld 408576698