1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

ChromeOsAssistant: Add assistant for ChromeOS

This commit is contained in:
Marc Bonnici 2017-12-21 16:34:11 +00:00 committed by setrofim
parent 776a4d850b
commit a7bf5c2df9

View File

@ -151,3 +151,30 @@ class LogcatPoller(threading.Thread):
self.last_poll = time.time()
self.target.dump_logcat(self.buffer_file, append=True, timeout=self.timeout)
self.target.clear_logcat()
class ChromeOsAssistant(LinuxAssistant):
parameters = LinuxAssistant.parameters + AndroidAssistant.parameters
def __init__(self, target, logcat_poll_period=None):
super(ChromeOsAssistant, self).__init__(target)
if target.supports_android:
self.android_assistant = AndroidAssistant(target.android_container, logcat_poll_period)
else:
self.android_assistant = None
def start(self):
super(ChromeOsAssistant, self).start()
if self.android_assistant:
self.android_assistant.start()
def extract_results(self, context):
super(ChromeOsAssistant, self).extract_results(context)
if self.android_assistant:
self.android_assistant.extract_results(context)
def stop(self):
super(ChromeOsAssistant, self).stop()
if self.android_assistant:
self.android_assistant.stop()