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

Side by Side Diff: build/download_sdk_extras.py

Issue 1418513007: Move find_depot_tools.py to build/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « build/download_gold_plugin.py ('k') | build/find_depot_tools.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to download sdk/extras packages on the bots from google storage. 6 """Script to download sdk/extras packages on the bots from google storage.
7 7
8 The script expects arguments that specify zips file in the google storage 8 The script expects arguments that specify zips file in the google storage
9 bucket named: <dir in SDK extras>_<package name>_<version>.zip. The file will 9 bucket named: <dir in SDK extras>_<package name>_<version>.zip. The file will
10 be extracted in the android_tools/sdk/extras directory on the test bots. This 10 be extracted in the android_tools/sdk/extras directory on the test bots. This
11 script will not do anything for developers. 11 script will not do anything for developers.
12 12
13 TODO(navabi): Move this script (crbug.com/459819). 13 TODO(navabi): Move this script (crbug.com/459819).
14 """ 14 """
15 15
16 import find_depot_tools
16 import json 17 import json
17 import os 18 import os
18 import shutil 19 import shutil
19 import subprocess 20 import subprocess
20 import sys 21 import sys
21 import zipfile 22 import zipfile
22 23
23 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) 24 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
24 CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) 25 CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir))
25 sys.path.insert(0, os.path.join(SCRIPT_DIR, 'android')) 26 sys.path.insert(0, os.path.join(SCRIPT_DIR, 'android'))
26 sys.path.insert(1, os.path.join(CHROME_SRC, 'tools'))
27 27
28 from pylib import constants 28 from pylib import constants
29 import find_depot_tools
30 29
31 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() 30 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
32 GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') 31 GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py')
33 SDK_EXTRAS_BUCKET = 'gs://chrome-sdk-extras' 32 SDK_EXTRAS_BUCKET = 'gs://chrome-sdk-extras'
34 SDK_EXTRAS_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'extras') 33 SDK_EXTRAS_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'extras')
35 SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), 34 SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__),
36 'android_sdk_extras.json') 35 'android_sdk_extras.json')
37 36
38 37
39 def clean_and_extract(dir_name, package_name, zip_file): 38 def clean_and_extract(dir_name, package_name, zip_file):
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 os.remove(local_zip) 90 os.remove(local_zip)
92 91
93 else: 92 else:
94 print ('WARNING: Failed to unpack SDK packages. If this bot compiles ' 93 print ('WARNING: Failed to unpack SDK packages. If this bot compiles '
95 'for Android, it may have errors.') 94 'for Android, it may have errors.')
96 return 1 95 return 1
97 96
98 97
99 if __name__ == '__main__': 98 if __name__ == '__main__':
100 sys.exit(main()) 99 sys.exit(main())
OLDNEW
« no previous file with comments | « build/download_gold_plugin.py ('k') | build/find_depot_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698