mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-06 21:32:37 +01:00
Fixes for Reader/Gmail/Photos
Check in missing UiAutomation .class files Fix generation and deletion of dump sys logs including renaming to a standard [test tag]_[test number].log format Improved Reader to run across a range of devices with subtlety different layouts and views
This commit is contained in:
@@ -66,30 +66,29 @@ class Gmail(AndroidUiAutoBenchmark):
|
||||
def update_result(self, context):
|
||||
super(Gmail, self).update_result(context)
|
||||
|
||||
if self.dumpsys_enabled:
|
||||
self.device.pull_file(self.output_file, context.output_directory)
|
||||
result_file = os.path.join(context.output_directory, self.instrumentation_log)
|
||||
self.device.pull_file(self.output_file, context.output_directory)
|
||||
result_file = os.path.join(context.output_directory, self.instrumentation_log)
|
||||
|
||||
with open(result_file, 'r') as wfh:
|
||||
regex = re.compile(r'(?P<key>\w+)\s+(?P<value1>\d+)\s+(?P<value2>\d+)\s+(?P<value3>\d+)')
|
||||
for line in wfh:
|
||||
match = regex.search(line)
|
||||
if match:
|
||||
context.result.add_metric((match.group('key') + "_start"),
|
||||
match.group('value1'))
|
||||
context.result.add_metric((match.group('key') + "_finish"),
|
||||
match.group('value2'))
|
||||
context.result.add_metric((match.group('key') + "_duration"),
|
||||
match.group('value3'))
|
||||
with open(result_file, 'r') as wfh:
|
||||
regex = re.compile(r'(?P<key>\w+)\s+(?P<value1>\d+)\s+(?P<value2>\d+)\s+(?P<value3>\d+)')
|
||||
for line in wfh:
|
||||
match = regex.search(line)
|
||||
if match:
|
||||
context.result.add_metric((match.group('key') + "_start"),
|
||||
match.group('value1'))
|
||||
context.result.add_metric((match.group('key') + "_finish"),
|
||||
match.group('value2'))
|
||||
context.result.add_metric((match.group('key') + "_duration"),
|
||||
match.group('value3'))
|
||||
|
||||
def teardown(self, context):
|
||||
super(Gmail, self).teardown(context)
|
||||
|
||||
for file in self.device.listdir(self.device.working_directory):
|
||||
if file.startswith (self.name) and file.endswith(".log"):
|
||||
if file.endswith(".log"):
|
||||
self.device.pull_file(os.path.join(self.device.working_directory, file), context.output_directory)
|
||||
self.device.delete_file(os.path.join(self.device.working_directory, file))
|
||||
if file.startswith (self.name) and file.endswith(".jpg"):
|
||||
if file.endswith(".jpg"):
|
||||
self.device.delete_file(os.path.join(self.device.working_directory, file))
|
||||
|
||||
# Force a re-index of the mediaserver cache to pick up new files
|
||||
|
Reference in New Issue
Block a user