Subject: Re: bug#59317: 29.0.50; Feature idea: suppress `message' output in ert batch test output

From: Stefan Kangas <[email-masked]>
Date: Wed, 16 Nov 2022 23:28:01 -0800

Eli Zaretskii <[email-masked]> writes:

> No, not that I know of.  We have several functions that will write to
> the terminal in batch mode, and they use different low-level
> interfaces to do that.  Also, some of the output goes to stdout and
> some to stderr.  You can always redirect these two streams to files,
> of course.
>
> Besides, we don't want to stop _everything_: the messages that
> announce the tests that passed and the time it took to run each test
> are useful and should not be shut up.

I was thinking of temporarily setting stdout and stderr to a buffer
(maybe using something like open_memstream) for the duration of each
individual test, and then print the content of that buffer only if the
test failed.

Maybe it's not worth the effort, though.  I'm also not sure how to do
the above portably.