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

Unified Diff: tools/telemetry/telemetry/core/bitmap.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/bitmap.py
diff --git a/tools/telemetry/telemetry/core/bitmap.py b/tools/telemetry/telemetry/core/bitmap.py
index e9b5913b8b924791237476f499e34f9ec22a0dc8..9f23b17ffe139b18d34e89e666d1ca67c5634944 100644
--- a/tools/telemetry/telemetry/core/bitmap.py
+++ b/tools/telemetry/telemetry/core/bitmap.py
@@ -13,9 +13,10 @@ import cStringIO
import collections
import struct
import subprocess
-import sys
from telemetry.core import util
+from telemetry.core.platform import factory
+from telemetry.util import support_binaries
util.AddDirToPythonPath(util.GetTelemetryDir(), 'third_party', 'png')
import png # pylint: disable=F0401
@@ -121,8 +122,8 @@ class _BitmapTools(object):
BOUNDING_BOX = 2
def __init__(self, dimensions, pixels):
- suffix = '.exe' if sys.platform == 'win32' else ''
- binary = util.FindSupportBinary('bitmaptools' + suffix)
+ binary = support_binaries.FindPath(
+ 'bitmaptools', factory.GetPlatformBackendForCurrentOS().GetOSName())
assert binary, 'You must build bitmaptools first!'
self._popen = subprocess.Popen([binary],

Powered by Google App Engine
This is Rietveld 408576698