mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +01: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:
@@ -381,6 +381,19 @@ class Device(Extension):
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def sleep(self, seconds):
|
||||
"""Sleep for the specified time on the target device.
|
||||
|
||||
:param seconds: Time in seconds to sleep on the device
|
||||
|
||||
The sleep is executed on the device using self.execute(). We
|
||||
set the timeout for this command to be 10 seconds longer than
|
||||
the sleep itself to make sure the command has time to complete
|
||||
before we timeout.
|
||||
|
||||
"""
|
||||
self.execute("sleep {}".format(seconds), timeout=seconds + 10)
|
||||
|
||||
def set_sysfile_value(self, filepath, value, verify=True):
|
||||
"""
|
||||
Write the specified value to the specified file on the device
|
||||
|
Reference in New Issue
Block a user