mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 21:08:51 +00:00
uxperf workloads: only broadcast media mounted if needed
Previously AndroidPerfWorkload broadcast media mounted unconditionally inside push_assets and delete_assets. This change makes it so the broadcast only happens if something was actually pushed/needs to be delete.
This commit is contained in:
parent
9ef8bddc4b
commit
cc3a815cb7
@ -652,14 +652,18 @@ class AndroidUxPerfWorkload(AndroidUiAutoBenchmark):
|
|||||||
return self.device.path.join(dirname, fname)
|
return self.device.path.join(dirname, fname)
|
||||||
|
|
||||||
def push_assets(self, context):
|
def push_assets(self, context):
|
||||||
|
pushed = False
|
||||||
for f in self.deployable_assets:
|
for f in self.deployable_assets:
|
||||||
fpath = context.resolver.get(File(self, f))
|
fpath = context.resolver.get(File(self, f))
|
||||||
device_path = self._path_on_device(fpath)
|
device_path = self._path_on_device(fpath)
|
||||||
if self.force_push_assets or not self.device.file_exists(device_path):
|
if self.force_push_assets or not self.device.file_exists(device_path):
|
||||||
self.device.push_file(fpath, device_path, timeout=300)
|
self.device.push_file(fpath, device_path, timeout=300)
|
||||||
|
pushed = True
|
||||||
|
if pushed:
|
||||||
self.device.broadcast_media_mounted(self.device.working_directory)
|
self.device.broadcast_media_mounted(self.device.working_directory)
|
||||||
|
|
||||||
def delete_assets(self):
|
def delete_assets(self):
|
||||||
|
if self.deployable_assets:
|
||||||
for f in self.deployable_assets:
|
for f in self.deployable_assets:
|
||||||
self.device.delete_file(self._path_on_device(f))
|
self.device.delete_file(self._path_on_device(f))
|
||||||
self.device.broadcast_media_mounted(self.device.working_directory)
|
self.device.broadcast_media_mounted(self.device.working_directory)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user