This is an archive of the discontinued LLVM Phabricator instance.

[lit] Flush stderr manually on Windows after printing messages
ClosedPublic

Authored by mstorsjo on Dec 14 2021, 2:24 PM.

Details

Summary

When run in a git bash terminal, sys.stderr isn't flushed implicitly
after printing each line. Manually flush it after each printout,
to avoid getting broken/misordered output.

A similar fix had been done in the old libcxx test config, committed
as part of 7e3ee09ad24cbca3ea7687c50b53be5269127fb1 / D28725; this
generalizes the fix, making it available in the new libcxx test
configs too, and for any other test that uses lit_config.note().

Diff Detail

Event Timeline

mstorsjo created this revision.Dec 14 2021, 2:24 PM
mstorsjo requested review of this revision.Dec 14 2021, 2:24 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 14 2021, 2:24 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Dec 14 2021, 3:04 PM
This revision is now accepted and ready to land.Dec 14 2021, 3:04 PM
mstorsjo updated this revision to Diff 395299.Dec 18 2021, 10:09 AM

Rerun precommit testing

This revision was landed with ongoing or failed builds.Dec 18 2021, 11:42 AM
This revision was automatically updated to reflect the committed changes.