Index: tools/telemetry/telemetry/util/support_binaries.py |
diff --git a/tools/telemetry/telemetry/util/support_binaries.py b/tools/telemetry/telemetry/util/support_binaries.py |
index 3e8c2bca3833845a3b58167924248b31d1047029..edccb0f6b3239005cd2f7078935b98ebb5883a70 100644 |
--- a/tools/telemetry/telemetry/util/support_binaries.py |
+++ b/tools/telemetry/telemetry/util/support_binaries.py |
@@ -10,13 +10,14 @@ from telemetry.util import cloud_storage |
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 |
@@ -39,15 +40,16 @@ def FindLocallyBuiltPath(binary_name): |
@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): |