From: Jeff King Date: Mon, 27 Apr 2015 23:02:23 GMT Subject: Re: [PATCH] git-p4: prevent --chain-lint failure 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: > 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