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

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

Issue 463353002: Make bitmaptools executable after downloading it from cloud storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update w/ review feedback; all downloaded binaries must be executable Created 6 years, 4 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 | « no previous file | tools/telemetry/telemetry/util/support_binaries_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/util/support_binaries.py
diff --git a/tools/telemetry/telemetry/util/support_binaries.py b/tools/telemetry/telemetry/util/support_binaries.py
index ebc19174224b9a85eceacde92f1948527775355f..3e8c2bca3833845a3b58167924248b31d1047029 100644
--- a/tools/telemetry/telemetry/util/support_binaries.py
+++ b/tools/telemetry/telemetry/util/support_binaries.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import os
+import stat
from telemetry import decorators
from telemetry.util import cloud_storage
@@ -48,6 +49,11 @@ def FindPath(binary_name, platform_name):
cloud_storage.GetIfChanged(_GetBinPath(binary_name, platform_name))
command = _GetBinPath(binary_name, platform_name)
+ # Ensure the downloaded file is actually executable.
+ if command and os.path.exists(command):
+ os.chmod(command,
+ stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP)
+
# Return an absolute path consistently.
if command:
command = os.path.abspath(command)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/util/support_binaries_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698