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

Re: [PATCH] git-p4: prevent --chain-lint failure

From
Jeff King <peff@peff.net>
Date
Apr 27, 2015, 23:02 UTC
Message-ID
<20150427230223.GA22403@peff.net>
In-Reply-To
<1430173228-22004-2-git-send-email-luke@diamand.org>
On Mon, Apr 27, 2015 at 11:20:28PM +0100, Luke Diamand wrote:
Show 7 quoted lines
> t9814 has a test that simply sets up a pre-requisite for
> another test, and as such, always succeeds. The way it was
> written doesn't quite work with the test lint checks introduced
> with the --chain-lint option.
> 
> Add an additional layer of {} to prevent the --chain-lint
> code getting confused.

Thanks for looking into this. I tried to fix any existing tests I could, but I missed ones whose prerequisites aren't met on my system.

Using {} is reasonable in general; that's how the fixes in 9ddc5ac (t: wrap complicated expect_code users in a block, 2015-03-20) worked. However, I think your case is somewhat simpler, in that you really just want a big conditional to set a prereq based on whether or not a command succeeds.

Would it make sense to convert this whole thing to just:
  test_lazy_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW '
	p4 configure show run.move.allow >out &&
	egrep ^run.move.allow: out
  '
?
-Peff
Previous: Luke Diamand
Message 3 of 3 in “Fixup test-lint error in git-p4 t9814 test”
  1. Fixup test-lint error in git-p4 t9814 testLuke Diamand, Apr 27, 2015
  2. git-p4: prevent --chain-lint failureLuke Diamand, Apr 27, 2015
  3. Jeff KingApr 27, 2015

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.