1
0
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:
Sascha Bischoff
2017-03-02 11:00:49 +00:00
parent 55e40ded1c
commit 4abbe7602a
15 changed files with 31 additions and 38 deletions

View File

@@ -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