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

Unified Diff: native_client_sdk/src/tools/getos.py

Issue 417763002: [NaCl SDK] Silence objdump warning when building w/ Chrome dev/beta. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/getos.py
diff --git a/native_client_sdk/src/tools/getos.py b/native_client_sdk/src/tools/getos.py
index 89b6c5790054999739fdaa77a94110376d49ae0e..c4e31c3188834a40b95db0cff49a0f19af9d7f1d 100755
--- a/native_client_sdk/src/tools/getos.py
+++ b/native_client_sdk/src/tools/getos.py
@@ -144,9 +144,17 @@ def GetNaClArch(platform):
# If CHROME_PATH is set to point to google-chrome or google-chrome
# was found in the PATH and we are running on UNIX then google-chrome
# is a bash script that points to 'chrome' in the same folder.
- if os.path.basename(chrome_path) == 'google-chrome':
+ #
+ # When running beta or dev branch, the name is google-chrome-{beta,dev}.
+ if os.path.basename(chrome_path).startswith('google-chrome'):
chrome_path = os.path.join(os.path.dirname(chrome_path), 'chrome')
+ if not os.path.exists(chrome_path):
+ raise Error("File %s does not exist." % chrome_path)
+
+ if not os.access(chrome_path, os.X_OK):
+ raise Error("File %s is not executable" % chrome_path)
+
Sam Clegg 2014/07/23 21:11:49 I was thinking we of doing this before we replace
try:
pobj = subprocess.Popen(['objdump', '-f', chrome_path],
stdout=subprocess.PIPE,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698