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

Move file management logic to per worload run

Move file management steps to initialize and finalize methods instead of
setup and teardown. These steps should be performed per run instead of
per iteration. Affected workloads: gmail, googlephotos.
This commit is contained in:
John Richardson
2016-05-12 12:59:58 +01:00
parent 2579c01757
commit 118112a9fc
4 changed files with 21 additions and 12 deletions

View File

@@ -58,8 +58,8 @@ class Googlephotos(AndroidUiAutoBenchmark):
self.uiauto_params['output_file'] = self.output_file
self.uiauto_params['dumpsys_enabled'] = self.dumpsys_enabled
def setup(self, context):
super(Googlephotos, self).setup(context)
def initialize(self, context):
super(Googlephotos, self).initialize(context)
for entry in os.listdir(self.dependencies_directory):
wa_file = ''.join([self.file_prefix, entry])
@@ -96,6 +96,10 @@ class Googlephotos(AndroidUiAutoBenchmark):
context.output_directory)
self.device.delete_file(os.path.join(self.device.working_directory, entry))
def finalize(self, context):
super(Googlephotos, self).finalize(context)
for entry in self.device.listdir(self.device.working_directory):
if entry.startswith(self.file_prefix) and entry.endswith(".jpg"):
self.device.delete_file(os.path.join(self.device.working_directory, entry))