Chromium Code Reviews| 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:])) |