Skip to content

Commit e1f19c7

Browse files
committed
Enable line buffering in framework build scripts.
1 parent ebe0470 commit e1f19c7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Apple/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,4 +1012,10 @@ def signal_handler(*args):
10121012

10131013

10141014
if __name__ == "__main__":
1015+
# Under the buildbot, stdout is not a TTY, but we must still flush after
1016+
# every line to make sure our output appears in the correct order relative
1017+
# to the output of our subprocesses.
1018+
for stream in [sys.stdout, sys.stderr]:
1019+
stream.reconfigure(line_buffering=True)
1020+
10151021
main()

Apple/testbed/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,4 +412,9 @@ def main():
412412

413413

414414
if __name__ == "__main__":
415+
# Under the buildbot, stdout is not a TTY, but we must still flush after
416+
# every line to make sure our output appears in the correct order relative
417+
# to the output of our subprocesses.
418+
for stream in [sys.stdout, sys.stderr]:
419+
stream.reconfigure(line_buffering=True)
415420
main()

0 commit comments

Comments
 (0)