Simon Jakobi pushed to branch wip/sjakobi/T12934-line-buffer-stdout at Glasgow Haskell Compiler / GHC Commits: f172de8a by Simon Jakobi at 2026-08-31T13:06:27+02:00 testsuite: Line-buffer the driver's stdout Python block-buffers stdout when it is a pipe. This is the case for example in CI. As a result there is often no indication of progress at all until the run ends. To fix this, we configure it explicitly to use line buffering instead. The type-ignore is for mypy, which types sys.stdout as TextIO — an interface without reconfigure. Fixes #12934. Assisted-by: Claude Fable 5 - - - - - 1 changed file: - testsuite/driver/runtests.py Changes: ===================================== testsuite/driver/runtests.py ===================================== @@ -38,6 +38,10 @@ import term_color from term_color import Color, colored import cpu_features +# Line-buffer stdout: when it is a pipe (as in CI), the block-buffered +# default setting delays test and progress output (#12934). +sys.stdout.reconfigure(line_buffering=True) # type: ignore[union-attr] + # Readline sometimes spews out ANSI escapes for some values of TERM, # which result in test failures. Thus set TERM to a nice, simple, safe # value. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f172de8a841d94e8ef91be7698e42e1f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f172de8a841d94e8ef91be7698e42e1f... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Simon Jakobi (@sjakobi)