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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 839893004: Refactor test scripts for android to improve performance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip checking package on JBMR2 or above Created 5 years, 11 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_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index fe9d2c64324ecb378bf43b4c63aa8e1d13a94acc..a4ddef1328057f6376175ae4f448e8eb314420c3 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -634,9 +634,12 @@ class DeviceUtils(object):
CommandTimeoutError on timeout.
DeviceUnreachableError on missing device.
"""
- # Check that the package exists before clearing it. Necessary because
- # calling pm clear on a package that doesn't exist may never return.
- if self.GetApplicationPath(package):
+ # Check that the package exists before clearing it for android builds below
+ # JB MR2. Necessary because calling pm clear on a package that doesn't exist
+ # may never return.
+ if ((self.build_version_sdk >=
+ constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN_MR2)
+ or self.GetApplicationPath(package)):
self.RunShellCommand(['pm', 'clear', package], check_return=True)
@decorators.WithTimeoutAndRetriesFromInstance()
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698