Thread (12 messages) 12 messages, 4 authors, 2022-10-25

Re: [PATCH] chainlint: colorize problem annotations and test delimiters

From: Jeff King <hidden>
Date: 2022-09-13 00:32:35

On Mon, Sep 12, 2022 at 08:15:33PM -0400, Jeff King wrote:
This is a lot of new processes. Should be OK in the run-once-for-all-tests
mode. It does make me wonder how much time regular test-lib.sh spends
doing these tput checks for every script (at least it's not every
snippet!).

It feels like we could build a color.sh snippet once and then include it
in each script. But maybe that is dumb, since you could in theory build
in one terminal and then run in another. Unlikely, but it shows that
file dependencies are a mismatch. I guess a better match would be
stuffing it into the environment before starting all of the tests.
I timed running the suite with and without TERM=dumb, as that is enough
to get test-lib.sh to skip running tput entirely. It doesn't seem to
make a measurable difference for me. Possibly it could on Windows, but I
don't think it's worth worrying about too much.

(If we did want to worry, "tput -S" is another option; it's not in
POSIX, but probably could be used on Windows).

And of course this was all "gee, I wonder about test-lib.sh"; it is all
orthogonal to your patch.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help