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

Re: [PATCH] test-lib: introduce the '-V' short option for '--verbose-log'

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Oct 29, 2018, 13:53 UTC
Message-ID
<20181029135335.GS30222@szeder.dev>
In-Reply-To
<20181029142108.GD17668@sigill.intra.peff.net>
On Mon, Oct 29, 2018 at 10:21:08AM -0400, Jeff King wrote:
Show 16 quoted lines
> On Mon, Oct 29, 2018 at 01:13:59PM +0100, SZEDER Gábor wrote:
> 
> > '--verbose-log' is one of the most useful and thus most frequently
> > used test options, but due to its length it's a pain to type on the
> > command line.
> > 
> > Let's introduce the corresponding short option '-V' to save some
> > keystrokes.
> 
> Interesting. I'm not opposed to something like this, but I added
> "--verbose-log" specifically for scripted cases, like running an
> unattended "prove" that needs to preserve stdout. When running
> individual tests, I'd just use "-v" itself, and possibly redirect the
> output.
> 
> For my curiosity, can you describe your use case a bit more?

Even when I run individual test scripts by hand, I prefer to have a file catching all output of the test, because I don't like it when the test output floods my terminal (especially with '-x'), and because the file is searchable but the terminal isn't. And that's exactly what '--verbose-log' does.

Redirecting the '-v' output (i.e. stdout) alone is insufficient, because any error messages within the tests and the '-x' trace go to stderr, so they still end up on the terminal. Therefore I would have to remember to redirect stderr every time as well.

I find it's much easier to just always use '--verbose-log'... except for the length of the option, that is, hence this patch.

Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “test-lib: introduce the '-V' short option for '--verbose-log'”
  1. test-lib: introduce the '-V' short option for '--verbose-log'SZEDER Gábor, Oct 29, 2018
  2. Jeff KingOct 29, 2018
  3. SZEDER GáborOct 29, 2018
  4. Jeff KingOct 29, 2018

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.