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

Side by Side Diff: tools/telemetry/catapult_base/support_binaries.py

Issue 1267123004: Temporarily fix downloads via support binaries on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import stat 6 import stat
7 7
8 from catapult_base import cloud_storage 8 from catapult_base import cloud_storage
9 from telemetry import decorators 9 from telemetry import decorators
10 from telemetry.internal.util import path 10 from telemetry.internal.util import path
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if not command and _IsInCloudStorage(binary_name, arch_name, platform_name): 49 if not command and _IsInCloudStorage(binary_name, arch_name, platform_name):
50 cloud_storage.GetIfChanged( 50 cloud_storage.GetIfChanged(
51 _GetBinPath(binary_name, arch_name, platform_name), 51 _GetBinPath(binary_name, arch_name, platform_name),
52 cloud_storage.PUBLIC_BUCKET) 52 cloud_storage.PUBLIC_BUCKET)
53 command = _GetBinPath(binary_name, arch_name, platform_name) 53 command = _GetBinPath(binary_name, arch_name, platform_name)
54 54
55 # Ensure the downloaded file is actually executable. 55 # Ensure the downloaded file is actually executable.
56 if command and os.path.exists(command): 56 if command and os.path.exists(command):
57 os.chmod(command, 57 os.chmod(command,
58 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP) 58 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP)
59 if not command and platform_name == 'win' and arch_name != 'AMD64':
60 # This is an awful, awful hack to temporarily fix cloud_storage downloads
61 # on XP until the binary_manager is finished and migrated to.
62 # Please don't try this at home.
63 return FindPath(binary_name, 'AMD64', platform_name)
59 64
60 # Return an absolute path consistently. 65 # Return an absolute path consistently.
61 if command: 66 if command:
62 command = os.path.abspath(command) 67 command = os.path.abspath(command)
63 return command 68 return command
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698