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

Re: [PATCH] Prefix shell test output messages with test id

From
Jeff King <peff@peff.net>
Date
Sep 6, 2012, 15:10 UTC
Message-ID
<20120906151008.GA7407@sigill.intra.peff.net>
In-Reply-To
<20120906123400.GA25467@tommy-fedora.scientificnet.net>
On Thu, Sep 06, 2012 at 02:34:00PM +0200, Thomas Gummerer wrote:
Show 12 quoted lines
> On 09/06, Jan-Marek Glogowski wrote:
> > This adds the test ID (tXXXX) prefix to the test result message of
> > all shell tests.  This is especially useful when doing a parallel
> > check run, where it's currently quite hard to identify the actual
> > failing test case.
> > 
> > Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
> 
> This breaks the TAP output format of the tests, which is needed to run
> them with prove.  To identify the failing tests more easily when running
> the tests in parallel, you may want to add GIT_TEST_TARGET = prove to
> your config.mak.

Yeah, I would second the suggestion to just use "prove". However, if for some reason that isn't an option, note that the stock harness stores results in test-results/. You can just grep it like this:

  grep 'failed [^0]' test-results/*

to find out which scripts had failures, which is usually sufficient (if you're running the tests in parallel, you won't have any sensible output anyway, so your first step is going to be to rerun the failed script with "-v" anyway).

But really, "prove" is much nicer, and I recommend it unless you don't have perl on your system.

-Peff
Previous: Thomas GummererNext: Jan-Marek Glogowski
Message 3 of 4 in “Prefix shell test output messages with test id”
  1. Prefix shell test output messages with test idJan-Marek Glogowski, Sep 6, 2012
  2. Thomas GummererSep 6, 2012
  3. Jeff KingSep 6, 2012
  4. Jan-Marek GlogowskiSep 6, 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.