mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-29 22:24:51 +00:00
Extend device with sleep functionality
This changeset adds the ability to sleep on the device via a device.sleep() method. This invokes sleep on the target device. This is useful for situations where the passage of time on the target device does not match that of the host, e.g., gem5. This changeset also updates a number of workloads to use this new sleep method.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#
|
||||
# pylint: disable=E1101,W0201
|
||||
import os
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from wlauto import settings, Workload, Parameter
|
||||
@@ -70,7 +69,7 @@ class Audio(Workload):
|
||||
self.device.execute('am start -W -S -n com.android.music/.MediaPlaybackActivity -d {}'.format(self.on_device_file))
|
||||
|
||||
def run(self, context):
|
||||
time.sleep(self.duration)
|
||||
self.device.sleep(self.duration)
|
||||
|
||||
def update_result(self, context):
|
||||
# Stop the audio
|
||||
|
||||
Reference in New Issue
Block a user