from telemetry.util import path
-def _GetBinPath(binary_name, platform_name):
- # TODO(tonyg): Add another nesting level for architecture_name.
- return os.path.join(path.GetTelemetryDir(), 'bin', platform_name, binary_name)
+def _GetBinPath(binary_name, arch_name, platform_name):
+ return os.path.join(
+ path.GetTelemetryDir(), 'bin', platform_name, arch_name, binary_name)
-def _IsInCloudStorage(binary_name, platform_name):
- return os.path.exists(_GetBinPath(binary_name, platform_name) + '.sha1')
+def _IsInCloudStorage(binary_name, arch_name, platform_name):
+ return os.path.exists(
+ _GetBinPath(binary_name, arch_name, platform_name) + '.sha1')
@decorators.Cache
@decorators.Cache
-def FindPath(binary_name, platform_name):
+def FindPath(binary_name, arch_name, platform_name):
"""Returns the path to the given binary name, pulling from the cloud if
necessary."""
if platform_name == 'win':
binary_name += '.exe'
command = FindLocallyBuiltPath(binary_name)
- if not command and _IsInCloudStorage(binary_name, platform_name):
- cloud_storage.GetIfChanged(_GetBinPath(binary_name, platform_name))
- command = _GetBinPath(binary_name, platform_name)
+ if not command and _IsInCloudStorage(binary_name, arch_name, platform_name):
+ cloud_storage.GetIfChanged(
+ _GetBinPath(binary_name, arch_name, platform_name))
+ command = _GetBinPath(binary_name, arch_name, platform_name)
# Ensure the downloaded file is actually executable.
if command and os.path.exists(command):