summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAudun Sutterud <audun.sutterud@qt.io>2023-12-18 10:31:10 +0100
committerAudun Sutterud <audun.sutterud@qt.io>2024-04-29 14:33:50 +0200
commit2cab289575a1dd81a77aaf6513bdbb6ba594c347 (patch)
tree994fcd8bd4a3d3b36e06b8521147102b7885e712
parentb52480a954c6197b66da1565cd098e8d6d3e42a9 (diff)
corebenchrunner: Fix a timeout bug
Explicit termination is necessary after the cancellation of an asyncio.subprocess.Process.wait(). Change-Id: I205352008f492cdcd5a741d3ae83570ff5cb7d0d Reviewed-by: Daniel Smith <daniel.smith@qt.io>
-rw-r--r--scripts/corebenchrunner/qt.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/corebenchrunner/qt.py b/scripts/corebenchrunner/qt.py
index 56af71ec..1bd922a1 100644
--- a/scripts/corebenchrunner/qt.py
+++ b/scripts/corebenchrunner/qt.py
@@ -129,6 +129,8 @@ class TestFile:
try:
await asyncio.wait_for(process.wait(), timeout=TEST_TIMEOUT)
except asyncio.TimeoutError:
+ process.terminate()
+ await process.wait()
return TestFileIssue(
test_file=self, description=f"Test timed out after {TEST_TIMEOUT} seconds"
)