aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-11-19 21:22:55 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-11-19 21:43:29 +0200
commit815e93fc16fafb716d563e45b3e44b37015f62dd (patch)
tree0c0ae1b612e5eaf7bf3d6cdc74a73f070fba1526 /mesonbuild/mtest.py
parentb40e4de3c6cfd931a2c0d9ba8b798bfacd3662c6 (diff)
downloadmeson-timeoutfix.zip
meson-timeoutfix.tar.gz
meson-timeoutfix.tar.bz2
Handle freezing tests. Fixes #10752.timeoutfix
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 981bc10..f13e755 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -1265,14 +1265,14 @@ class TestSubprocess:
# Make sure the termination signal actually kills the process
# group, otherwise retry with a SIGKILL.
- with suppress(TimeoutError):
+ with suppress(asyncio.TimeoutError):
await asyncio.wait_for(p.wait(), timeout=0.5)
if p.returncode is not None:
return None
os.killpg(p.pid, signal.SIGKILL)
- with suppress(TimeoutError):
+ with suppress(asyncio.TimeoutError):
await asyncio.wait_for(p.wait(), timeout=1)
if p.returncode is not None:
return None
@@ -1281,7 +1281,7 @@ class TestSubprocess:
# Try to kill it one last time with a direct call.
# If the process has spawned children, they will remain around.
p.kill()
- with suppress(TimeoutError):
+ with suppress(asyncio.TimeoutError):
await asyncio.wait_for(p.wait(), timeout=1)
if p.returncode is not None:
return None