Commit edece565 authored by Joey Scarr's avatar Joey Scarr Committed by Commit Bot

Modify download_translation_unit_tool.py to work on Windows.

The net effect of this change is to explicitly run update.py using sys.executable rather than running os.popen directly on the script.

Bug: 396230
Change-Id: Ie896303ed084f254ab7a7b1da201d108c8718ac5
Reviewed-on: https://chromium-review.googlesource.com/1068530
Commit-Queue: Joey Scarr <jsca@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560822}
parent aee4fd63
......@@ -24,13 +24,14 @@ LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build',
'Release+Asserts')
CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts',
'update.py')
CLANG_REVISION = os.popen(CLANG_UPDATE_PY + ' --print-revision').read().rstrip()
CLANG_BUCKET = 'gs://chromium-browser-clang'
def main():
targz_name = 'translation_unit-%s.tgz' % CLANG_REVISION
clang_revision = subprocess.check_output([sys.executable, CLANG_UPDATE_PY,
'--print-revision']).rstrip()
targz_name = 'translation_unit-%s.tgz' % clang_revision
if sys.platform == 'win32' or sys.platform == 'cygwin':
cds_full_url = CLANG_BUCKET + '/Win/' + targz_name
......@@ -42,7 +43,7 @@ def main():
os.chdir(LLVM_BUILD_PATH)
subprocess.check_call(['python', GSUTIL_PATH,
subprocess.check_call([sys.executable, GSUTIL_PATH,
'cp', cds_full_url, targz_name])
tarfile.open(name=targz_name, mode='r:gz').extractall(path=LLVM_BUILD_PATH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment