mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
Merge pull request #187 from bjackman/clear-logcat-lock
AndroidTarget: prevent concurrent invocations of 'logcat -c'
This commit is contained in:
commit
4d269774f7
@ -950,6 +950,7 @@ class AndroidTarget(Target):
|
||||
shell_prompt=shell_prompt,
|
||||
conn_cls=conn_cls)
|
||||
self.package_data_directory = package_data_directory
|
||||
self.clear_logcat_lock = threading.Lock()
|
||||
|
||||
def reset(self, fastboot=False): # pylint: disable=arguments-differ
|
||||
try:
|
||||
@ -1182,7 +1183,8 @@ class AndroidTarget(Target):
|
||||
adb_command(self.adb_name, command, timeout=timeout)
|
||||
|
||||
def clear_logcat(self):
|
||||
adb_command(self.adb_name, 'logcat -c', timeout=30)
|
||||
with self.clear_logcat_lock:
|
||||
adb_command(self.adb_name, 'logcat -c', timeout=30)
|
||||
|
||||
def get_logcat_monitor(self, regexps=None):
|
||||
return LogcatMonitor(self, regexps)
|
||||
|
Loading…
x
Reference in New Issue
Block a user