1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-26 07:02:38 +01:00

TM: Update and Refactor

TM has been updated and restructured to be clearer, including splitting off
assistant and creating a runtime parameter manager into their own files.
This commit is contained in:
Marc Bonnici
2017-03-06 17:29:15 +00:00
parent 519389859e
commit 11323b6256
7 changed files with 894 additions and 394 deletions

View File

@@ -8,6 +8,7 @@ import time
from wa import Parameter
from wa.framework.exception import WorkerThreadError
from wa.utils.misc import touch
class LinuxAssistant(object):
@@ -121,8 +122,7 @@ class LogcatPoller(threading.Thread):
self.logger.debug('clearing logcat buffer')
with self.lock:
self.target.clear_logcat()
with open(self.buffer_file, 'w') as _: # NOQA
pass
touch(self.buffer_file)
def write_log(self, outfile):
with self.lock:
@@ -130,8 +130,7 @@ class LogcatPoller(threading.Thread):
if os.path.isfile(self.buffer_file):
shutil.copy(self.buffer_file, outfile)
else: # there was no logcat trace at this time
with open(outfile, 'w') as _: # NOQA
pass
touch(outfile)
def close(self):
self.logger.debug('closing poller')