From 3bee4d9a19a216d63a689f7833a2d4e155baccaf Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 22 Feb 2021 14:38:48 +0900 Subject: [PATCH] scripts/test.py: Fix infinite busy loops on macOS I confirmed that the same number of tests are run with "make test" on: * Ubuntu with and without this change * macOS with this change > ====== results ====== > tests passed 817/817 (100.00%) > tests failed 0/817 (0.00%) --- scripts/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/test.py b/scripts/test.py index 4e205f7..42a10f9 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -292,6 +292,8 @@ class TestCase: if e.errno == errno.EIO: break raise + if not line: + break; stdout.append(line) if args.get('verbose'): sys.stdout.write(line) @@ -687,6 +689,8 @@ def main(**args): if e.errno == errno.EIO: break raise + if not line: + break; stdout.append(line) if args.get('verbose'): sys.stdout.write(line)