| Index: build/android/pylib/constants.py
|
| diff --git a/build/android/pylib/constants.py b/build/android/pylib/constants.py
|
| index 29da601259ddb734145583b41ca4e390fc75990e..e89a29869f9cd426a8a30f396b15b831cef3e84f 100644
|
| --- a/build/android/pylib/constants.py
|
| +++ b/build/android/pylib/constants.py
|
| @@ -187,6 +187,7 @@ PYTHON_UNIT_TEST_SUITES = {
|
| 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android'),
|
| 'test_modules': [
|
| 'pylib.device.device_utils_test',
|
| + 'pylib.utils.md5sum_test',
|
| ]
|
| },
|
| 'gyp_py_unittests': {
|
| @@ -246,8 +247,21 @@ def _Memoize(func):
|
| return Wrapper
|
|
|
|
|
| -@_Memoize
|
| +def SetAdbPath(adb_path):
|
| + os.environ['ADB_PATH'] = adb_path
|
| +
|
| +
|
| def GetAdbPath():
|
| + # Check if a custom adb path as been set. If not, try to find adb
|
| + # on the system.
|
| + if os.environ.get('ADB_PATH'):
|
| + return os.environ.get('ADB_PATH')
|
| + else:
|
| + return _FindAdbPath()
|
| +
|
| +
|
| +@_Memoize
|
| +def _FindAdbPath():
|
| if os.environ.get('ANDROID_SDK_ROOT'):
|
| return 'adb'
|
| # If envsetup.sh hasn't been sourced and there's no adb in the path,
|
| @@ -260,7 +274,6 @@ def GetAdbPath():
|
| logging.debug('No adb found in $PATH, fallback to checked in binary.')
|
| return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
|
|
|
| -
|
| # Exit codes
|
| ERROR_EXIT_CODE = 1
|
| WARNING_EXIT_CODE = 88
|
|
|