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

Unified Diff: build/android/pylib/device/commands/install_commands.py

Issue 1325893002: Defer running of install_commands.Installed() until necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device2
Patch Set: single check Created 5 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 | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/commands/install_commands.py
diff --git a/build/android/pylib/device/commands/install_commands.py b/build/android/pylib/device/commands/install_commands.py
index 58c56ccb1be2900515c8d848879600c4b98e8385..50f3940285c433353d93d59d951ec90761ecca0a 100644
--- a/build/android/pylib/device/commands/install_commands.py
+++ b/build/android/pylib/device/commands/install_commands.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import os
+import posixpath
from pylib import constants
@@ -22,8 +23,13 @@ exec app_process $base/bin %s $@
def Installed(device):
- return (all(device.FileExists('%s/%s' % (BIN_DIR, c)) for c in _COMMANDS)
jbudorick 2015/09/01 20:33:20 If we think that FileExists doesn't handle the mul
agrieve 2015/09/02 15:34:49 Done.
- and device.FileExists('%s/chromium_commands.jar' % _FRAMEWORK_DIR))
+ cmd = 'test'
+ for c in _COMMANDS:
+ cmd += '-e %s -a' % posixpath.join(BIN_DIR, c)
+ cmd += '-e %s' % posixpath.join(_FRAMEWORK_DIR, 'chromium_commands.jar')
+ cmd += ' || echo 1'
+ return not device.RunShellCommand(cmd, check_return=True)
+
def InstallCommands(device):
if device.IsUserBuild():
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698