| Index: build/android/devil/android/sdk/adb_wrapper.py
|
| diff --git a/build/android/devil/android/sdk/adb_wrapper.py b/build/android/devil/android/sdk/adb_wrapper.py
|
| index 38db0e1fc1f1429f73d108663791ac7277aa1f3a..0448238eefcce885438bbcd0b3037ce9ad26e5c9 100644
|
| --- a/build/android/devil/android/sdk/adb_wrapper.py
|
| +++ b/build/android/devil/android/sdk/adb_wrapper.py
|
| @@ -147,7 +147,7 @@ class AdbWrapper(object):
|
| device_serial=self._device_serial,
|
| check_error=check_error)
|
|
|
| - def _IterRunDeviceAdbCmd(self, args, timeout):
|
| + def _IterRunDeviceAdbCmdLines(self, args, timeout):
|
| """Runs an adb command and returns an iterator over its output lines.
|
|
|
| Args:
|
| @@ -160,6 +160,19 @@ class AdbWrapper(object):
|
| return cmd_helper.IterCmdOutputLines(
|
| self._BuildAdbCmd(args, self._device_serial), timeout=timeout)
|
|
|
| + def _IterRunDeviceAdbCmd(self, args, timeout):
|
| + """Runs an adb command and returns an iterator over its output.
|
| +
|
| + Args:
|
| + args: A list of arguments to adb.
|
| + timeout: Timeout in seconds.
|
| +
|
| + Yields:
|
| + The current output of the command.
|
| + """
|
| + return cmd_helper.IterCmdOutput(
|
| + self._BuildAdbCmd(args, self._device_serial), timeout=timeout)
|
| +
|
| def __eq__(self, other):
|
| """Consider instances equal if they refer to the same device.
|
|
|
| @@ -375,7 +388,7 @@ class AdbWrapper(object):
|
| cmd, 'path does not specify an accessible directory in the device',
|
| device_serial=self._device_serial)
|
|
|
| - def Logcat(self, clear=False, dump=False, filter_specs=None,
|
| + def Logcat(self, clear=False, dump=False, output_file=None, filter_specs=None,
|
| logcat_format=None, ring_buffer=None, timeout=None,
|
| retries=_DEFAULT_RETRIES):
|
| """Get an iterable over the logcat output.
|
| @@ -411,6 +424,8 @@ class AdbWrapper(object):
|
| if ring_buffer:
|
| for buffer_name in ring_buffer:
|
| cmd.extend(['-b', buffer_name])
|
| + if output_file:
|
| + cmd.extend(['-f', output_file])
|
| if filter_specs:
|
| cmd.extend(filter_specs)
|
|
|
|
|