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

Unified Diff: tools/telemetry/telemetry/core/util.py

Issue 26932003: [Telemetry] Build and install memconsumer app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: User friendly exception Created 7 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
« no previous file with comments | « tools/telemetry/telemetry/core/platform/profiler/oomkiller_profiler.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/util.py
diff --git a/tools/telemetry/telemetry/core/util.py b/tools/telemetry/telemetry/core/util.py
index a013eea60d564d16cd259f27f488b52e34137cce..59cf52f43f447bce8339f126f3b017d346012a8f 100644
--- a/tools/telemetry/telemetry/core/util.py
+++ b/tools/telemetry/telemetry/core/util.py
@@ -122,16 +122,19 @@ def GetBuildDirectories():
for build_type in build_types:
yield build_dir, build_type
-def FindSupportBinary(binary_name):
+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, os.X_OK):
+ 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
« no previous file with comments | « tools/telemetry/telemetry/core/platform/profiler/oomkiller_profiler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698