scripts: twisterlib: handlers: early QEMU timeout
Terminate QEMU earlier if the test finishes and no output data is received for 1 second. This new timeout operates in parallel with the global test timeout. For coverage testing, this can reduce the time spent running individual tests by up to 29 seconds, while still giving the full 30 extra seconds to dump gcov data if needed. Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
52284f57ce
commit
44f5a5d5d4
1 changed files with 3 additions and 0 deletions
|
@ -882,6 +882,9 @@ class QEMUHandler(Handler):
|
|||
|
||||
while True:
|
||||
this_timeout = int((timeout_time - time.time()) * 1000)
|
||||
if timeout_extended:
|
||||
# Quit early after timeout extension if no more data is being received
|
||||
this_timeout = min(this_timeout, 1000)
|
||||
if this_timeout < 0 or not p.poll(this_timeout):
|
||||
try:
|
||||
if pid and this_timeout > 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue