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

Unified Diff: tools/telemetry/telemetry/core/platform/linux_platform_backend.py

Issue 643973002: Add multi-architecture support in telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failure Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/platform/linux_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/linux_platform_backend.py b/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
index 4a24b147c99c7dc0a9892c925c2fe8598f667208..54fde65707b7e81da791bab67dc4d8b1a485da6b 100644
--- a/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
@@ -4,6 +4,7 @@
import logging
import os
+import platform
import subprocess
import sys
@@ -44,6 +45,10 @@ class LinuxPlatformBackend(
def HasBeenThermallyThrottled(self):
raise NotImplementedError()
+ @decorators.Cache
+ def GetArchName(self):
+ return platform.machine()
+
def GetOSName(self):
return 'linux'
@@ -121,8 +126,10 @@ class LinuxPlatformBackend(
['lsmod'], stdout=subprocess.PIPE).communicate()[0]
def _InstallIpfw(self):
- ipfw_bin = support_binaries.FindPath('ipfw', self.GetOSName())
- ipfw_mod = support_binaries.FindPath('ipfw_mod.ko', self.GetOSName())
+ ipfw_bin = support_binaries.FindPath(
+ 'ipfw', self.GetArchName(), self.GetOSName())
+ ipfw_mod = support_binaries.FindPath(
+ 'ipfw_mod.ko', self.GetArchName(), self.GetOSName())
try:
changed = cloud_storage.GetIfChanged(
@@ -148,7 +155,8 @@ class LinuxPlatformBackend(
'your kernel. See: http://info.iet.unipi.it/~luigi/dummynet/'
def _InstallBinary(self, bin_name, fallback_package=None):
- bin_path = support_binaries.FindPath(bin_name, self.GetOSName())
+ bin_path = support_binaries.FindPath(
+ bin_name, self.GetArchName(), self.GetOSName())
if not bin_path:
raise Exception('Could not find the binary package %s' % bin_name)
os.environ['PATH'] += os.pathsep + os.path.dirname(bin_path)

Powered by Google App Engine
This is Rietveld 408576698