Bug 1676726 - [mozdevice] Do not raise an error if adb logcat -c fails., r=aerickson.

Depends on D97571

Differential Revision: https://phabricator.services.mozilla.com/D97572
This commit is contained in:
Bob Clary 2020-11-20 09:36:31 +00:00
Родитель 381bc7d040
Коммит c8c25b95f5
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -1972,8 +1972,15 @@ class ADBDevice(ADBCommand):
self._logger.warning(
"retryable logcat clear error?: {}. Retrying...".format(str(e))
)
self.command_output(cmds, timeout=timeout)
self.shell_output("log logcat cleared", timeout=timeout)
try:
self.command_output(cmds, timeout=timeout)
self.shell_output("log logcat cleared", timeout=timeout)
except ADBProcessError as e2:
if "failed to clear" not in str(e):
raise
self._logger.warning(
"Ignoring failure to clear logcat: {}.".format(str(e2))
)
def get_logcat(
self,