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

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

Issue 238513003: [Telemetry] Make Telemetry binaries platform aware. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to util/ Created 6 years, 8 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 40dc647b77978c527da99e7404ca80603b4a5876..044a9946c525f3f2ccf03b312778c24074f6b231 100644
--- a/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/linux_platform_backend.py
@@ -13,6 +13,7 @@ from telemetry.core.platform import platform_backend
from telemetry.core.platform import posix_platform_backend
from telemetry.core.platform import proc_supporting_platform_backend
from telemetry.page import cloud_storage
+from telemetry.util import support_binaries
class LinuxPlatformBackend(
@@ -81,8 +82,8 @@ class LinuxPlatformBackend(
['lsmod'], stdout=subprocess.PIPE).communicate()[0]
def _InstallIpfw(self):
- ipfw_bin = os.path.join(util.GetTelemetryDir(), 'bin', 'ipfw')
- ipfw_mod = os.path.join(util.GetTelemetryDir(), 'bin', 'ipfw_mod.ko')
+ ipfw_bin = support_binaries.FindPath('ipfw', self.GetOSName())
+ ipfw_mod = support_binaries.FindPath('ipfw_mod.ko', self.GetOSName())
try:
changed = cloud_storage.GetIfChanged(
@@ -104,9 +105,9 @@ class LinuxPlatformBackend(
assert self.CanLaunchApplication('ipfw'), 'Failed to install ipfw'
def _InstallAvconv(self):
- telemetry_bin_dir = os.path.join(util.GetTelemetryDir(), 'bin')
- avconv_bin = os.path.join(telemetry_bin_dir, 'avconv')
- os.environ['PATH'] += os.pathsep + telemetry_bin_dir
+ avconv_bin = support_binaries.FindPath('avconv', self.GetOSName())
+ os.environ['PATH'] += os.pathsep + os.path.join(util.GetTelemetryDir(),
+ 'bin')
try:
cloud_storage.GetIfChanged(avconv_bin, cloud_storage.INTERNAL_BUCKET)

Powered by Google App Engine
This is Rietveld 408576698