| 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
|
|
|