git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v6 0/7] make test output coloring more intuitive

From
Jeff King <peff@peff.net>
Date
Dec 20, 2012, 19:50 UTC
Message-ID
<20121220195010.GA21785@sigill.intra.peff.net>
In-Reply-To
<7vy5gs4jiy.fsf@alter.siamese.dyndns.org>
On Thu, Dec 20, 2012 at 11:21:09AM -0800, Junio C Hamano wrote:
Show 23 quoted lines
> The "expected_failure" cases painted in "warn" are all long-known
> failures; I do not think reminding about them in "bold" over and
> over will help encouraging the developers take a look at them.
> 
> The "skipped" cases fall into two categories.  Either you already
> know you choose to not to care (e.g. I do not expect to use git-p4
> and decided not to install p4 anywhere, so I may have t98?? on
> GIT_SKIP_TESTS environment) or you haven't reached that point on a
> new system and haven't realized that you didn't install a package
> needed to run tests you care about (e.g. cvsserver tests would not
> run without Perl interface to SQLite).  For the former, the bold
> output is merely distracting; for the latter, bold _might_ help in
> this case.
> 
> At least, I think
> 
> 	GIT_SKIP_TESTS=t98?? sh t9800-git-p4-basic.sh -v
> 
> should paint "skipping test t9800 altogether" (emitted with "-v) and
> the last line "1..0 # SKIP skip all tests in t9800" both in the same
> "info" color.
> 
> How about going further to reduce "bold" a bit more, like this?

Yeah, I think it is a little easier on the eyes while maintaining the intended color scheme.

Show 10 quoted lines
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index aaf013e..2bbb81d 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -182,13 +182,13 @@ then
>  		error)
>  			tput bold; tput setaf 1;; # bold red
>  		skip)
> -			tput bold; tput setaf 4;; # bold blue
> +			tput setaf 4;; # bold blue

On my xterm, at least, this is actually the difference between light blue" and dark blue, not bold and not-bold. I think it is OK, though to be honest, having seen the "skip all" messages in cyan (e.g., running t9800), I think just printing skip messages in cyan looks best. But it is not that big a deal to me, and we are well into bikeshed territory, I think, so that will be my last word on the subject.

-Peff
Previous: Junio C HamanoNext: Adam Spiers
Message 17 of 18 in “make test output coloring more intuitive”
  1. 0/7 make test output coloring more intuitiveAdam Spiers, Dec 16, 2012
  2. 1/7 tests: test number comes first in 'not ok $count - $message'Adam Spiers, Dec 16, 2012
  3. 2/7 tests: paint known breakages in bold yellowAdam Spiers, Dec 16, 2012
  4. 3/7 tests: paint skipped tests in bold blueAdam Spiers, Dec 16, 2012
  5. 4/7 tests: change info messages from yellow/brown to bold cyanAdam Spiers, Dec 16, 2012
  6. 5/7 tests: refactor mechanics of testing in a sub test-libAdam Spiers, Dec 16, 2012
  7. 6/7 tests: test the test framework more thoroughlyAdam Spiers, Dec 16, 2012
  8. 7/7 tests: paint unexpectedly fixed known breakages in bold redAdam Spiers, Dec 16, 2012
  9. Junio C HamanoDec 16, 2012
  10. Adam SpiersDec 16, 2012
  11. Junio C HamanoDec 16, 2012
  12. Jeff KingDec 20, 2012
  13. Adam SpiersDec 20, 2012
  14. Jeff KingDec 20, 2012
  15. Adam SpiersDec 20, 2012
  16. Junio C HamanoDec 20, 2012
  17. Jeff KingDec 20, 2012
  18. Adam SpiersDec 20, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.