diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-03-24 22:46:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-27 08:15:06 +0100 |
commit | 58e6e7c2043d7f4b48ec3b4b9daf25f5766fa5d2 (patch) | |
tree | 292df67088c5a987b3b046670cda5c807d0ffd0b /meta/lib/oeqa/targetcontrol.py | |
parent | 1e3f04f86aac7f547b10c187f82983fa3137be55 (diff) | |
download | poky-58e6e7c2043d7f4b48ec3b4b9daf25f5766fa5d2.tar.gz |
qemurunner: configurable timeout for run_serial()
Some commands might need to run longer than the default timeout of
five seconds. If that occurred, run_serial() returned with a status
code of zero (sic!) and no other indication of what went wrong.
Now the timeout is configurable (with five still the default) and
an explicit warning ("<<< run_serial(): command timed out after 5 seconds without output >>>")
gets appended at the end of the data returned to the caller.
While at it, the logic for checking for the timeout was updated a bit
because both implementations could overshoot the timeout when entering
select() right before the final deadline.
(From OE-Core rev: accf0362f964cc9d6330b6e52e83d748d890521f)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 0ad3a6bf14..2f071e0901 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -206,8 +206,8 @@ class QemuTarget(BaseTarget): | |||
206 | else: | 206 | else: |
207 | raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) | 207 | raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) |
208 | 208 | ||
209 | def run_serial(self, command): | 209 | def run_serial(self, command, timeout=5): |
210 | return self.runner.run_serial(command) | 210 | return self.runner.run_serial(command, timeout=timeout) |
211 | 211 | ||
212 | 212 | ||
213 | class SimpleRemoteTarget(BaseTarget): | 213 | class SimpleRemoteTarget(BaseTarget): |