| Index: third_party/android_testrunner/adb_interface.py
|
| diff --git a/third_party/android_testrunner/adb_interface.py b/third_party/android_testrunner/adb_interface.py
|
| index 93e19632a84b08da4269e2f8b965d4c392b42c4d..179aca95d9d0c840bab450715d9a606c46c1208f 100644
|
| --- a/third_party/android_testrunner/adb_interface.py
|
| +++ b/third_party/android_testrunner/adb_interface.py
|
| @@ -37,8 +37,20 @@ class AdbInterface:
|
| # argument to pass to adb, to direct command to specific device
|
| _target_arg = ""
|
|
|
| + # argument used to specify adb binary. Defaults to adb in the
|
| + # environment path.
|
| + _adb_path = 'adb'
|
| +
|
| DEVICE_TRACE_DIR = "/data/test_results/"
|
|
|
| + def SetAdbPath(self, adb_path):
|
| + """Set the path to the adb binary.
|
| +
|
| + Args:
|
| + adb_path: absolute path to the adb binary that should be used.
|
| + """
|
| + self._adb_path = adb_path
|
| +
|
| def SetEmulatorTarget(self):
|
| """Direct all future commands to the only running emulator."""
|
| self._target_arg = "-e"
|
| @@ -66,7 +78,7 @@ class AdbInterface:
|
| Raises:
|
| WaitForResponseTimedOutError if device does not respond to command within time
|
| """
|
| - adb_cmd = "adb %s %s" % (self._target_arg, command_string)
|
| + adb_cmd = "%s %s %s" % (self._adb_path, self._target_arg, command_string)
|
| logger.SilentLog("about to run %s" % adb_cmd)
|
| return run_command.RunCommand(adb_cmd, timeout_time=timeout_time,
|
| retry_count=retry_count)
|
|
|