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

Unified Diff: tools/telemetry/telemetry/core/util.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/util.py
diff --git a/tools/telemetry/telemetry/core/util.py b/tools/telemetry/telemetry/core/util.py
index e44bd26ffb04226f1024088308388f5d47f96aa1..2ae9d725e8015e5092e458ef3f576c4e65cf668a 100644
--- a/tools/telemetry/telemetry/core/util.py
+++ b/tools/telemetry/telemetry/core/util.py
@@ -1,6 +1,7 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
import imp
import inspect
import logging
@@ -147,23 +148,3 @@ def GetBuildDirectories():
for build_dir in build_dirs:
for build_type in build_types:
yield build_dir, build_type
-
-def FindSupportBinary(binary_name, executable=True):
- """Returns the path to the given binary name."""
- # TODO(tonyg/dtu): This should support finding binaries in cloud storage.
- command = None
- command_mtime = 0
- required_mode = os.R_OK
- if executable:
- required_mode = os.X_OK
-
- chrome_root = GetChromiumSrcDir()
- for build_dir, build_type in GetBuildDirectories():
- candidate = os.path.join(chrome_root, build_dir, build_type, binary_name)
- if os.path.isfile(candidate) and os.access(candidate, required_mode):
- candidate_mtime = os.stat(candidate).st_mtime
- if candidate_mtime > command_mtime:
- command = candidate
- command_mtime = candidate_mtime
-
- return command
« no previous file with comments | « tools/telemetry/telemetry/core/platform/win_platform_backend.py ('k') | tools/telemetry/telemetry/util/support_binaries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698