diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-11-19 21:22:55 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-11-21 16:44:24 +0200 |
commit | 3ae89a7150264ae5a112975af1377ee1c04cb994 (patch) | |
tree | 1b2a5ddb3ee3d96c590d0e2909e5e7c39e128767 /mesonbuild | |
parent | e5ce7f0770ce392dfefffe3c0d66dcc024b41ad0 (diff) | |
download | meson-3ae89a7150264ae5a112975af1377ee1c04cb994.zip meson-3ae89a7150264ae5a112975af1377ee1c04cb994.tar.gz meson-3ae89a7150264ae5a112975af1377ee1c04cb994.tar.bz2 |
Handle freezing tests. Fixes #10752.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mtest.py | 6 |
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 |