From patchwork Thu Aug 8 05:38:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13756959 Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 412C9181D00 for ; Thu, 8 Aug 2024 05:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723095500; cv=none; b=X/nVMiYhR6FSSpehFcPYVHTlKhRRenwcZSWnolBVa9eYvj14DFE9zrYwobbQAttMDD1SDrS5TaMRkw3TsHsq4RGU8Zz9xprcp/rQlNh+ZAsHP6x1MvK4KH9psUdpHY77y8GrXRdJh+wCdHO9FecwiFiEVTe+i9JZYg7sJcVmmo8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723095500; c=relaxed/simple; bh=yYheCj658JUNiAmvjGSyOaFJfI49oqp2r6Nf7Bk7990=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s+ua12B4min9FiP97v3usAOk2OGRwX+oJAa7cuVcEtGN8X3JGJFWbdL+fwr0Pb8pVScXNgAJoji2SkYVtRyZ1som70CdSExWONmsoL+bUy6eBQz6RtP2d/Z+gu2/iUHqmwwkmkFHEGf3Ve7XrPdaP6hkYlIJEfaBOaJa5OtkFLw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=hIiC+ltl; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=d5CNayzf; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="hIiC+ltl"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="d5CNayzf" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 54850138FC99; Thu, 8 Aug 2024 01:38:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Aug 2024 01:38:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1723095496; x=1723181896; bh=OH0i2yh2SS MX8bUI4Ot405TTI3ZWdTWxnxA9My8x5hU=; b=hIiC+ltlPQEpMsqfOYkV/Ry9Ck cKgBqijEUKLEZ5fWGCcjckeEPsGTmJEAlTlW0uF72lQQTt8HgRqWEPOeZJ8pIVXm eH/lzZ+xRO8f8ZbwmXDz0gbUAfUGnBa4pghlKGY2PvIcTgGm59rp0adGPtB/xg7s cU8g+quOTO9Ev1UlYmPsacFE6DfdkQ/OwlADLnbTOjQ+vVLPW2zy8ddYjxjFO8vG 0+0JKK0zSS6olU1+sBdMu/Nh8Zjaf8rCYK1JxfKDHk8WtgCRMBJC9nFakZQ8ChVQ xH5JeJhG/ExItlvb0BW+CarH4sqmJWZydbm9Z912VB4atOesvbkA9m1kia0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1723095496; x=1723181896; bh=OH0i2yh2SSMX8bUI4Ot405TTI3ZW dTWxnxA9My8x5hU=; b=d5CNayzfG4mYMlyemzriE8XG/Fh7SCdL4NRLPEJTH0PL qmkT+0ujb0CSLajSJYkVRyd2KXipBp7TwXftLQTdGLBuF4hNOrrm9izMEnjhne7d VvjYLgMZzBQitBtek5AgmwLgPlC6m+hrP8OfOoD+r4s8z5gQS8w23oyMw0KiY1nT 63Qmx9p035Y3rxTk04jxLf0nsD77oaL82UU+ic7cnPhhlwGDtI2dNBYn+wlIMBrG TruCCq1vyT7MmRrsX8ANtyow65eQj+gQnOT4cgFAbjBbTiomvmHldVYl1MpkUx+t xiWONqpsrILQZzsauISll2w8+htod+gx3vvRlqgODg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrledugdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecu hfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqe enucggtffrrghtthgvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeeh gfeltddtheejleffteenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrih hlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopeekpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopehphhhilhhlihhprdifohhougesughunhgvlhhmrdhorh hgrdhukhdprhgtphhtthhopehlrdhsrdhrseifvggsrdguvgdprhgtphhtthhopehgihht shhtvghrsehpohgsohigrdgtohhmpdhrtghpthhtohepshhtvggrughmohhnsehgohhogh hlvgdrtghomhdprhgtphhtthhopehsphgvtghtrhgrlhesghhoohhglhgvrdgtohhmpdhr tghpthhtohepvghthhhomhhsohhnsegvugifrghrughthhhomhhsohhnrdgtohhmpdhrtg hpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrshgs vggtkhgvrhesnhgvgigsrhhiughgvgdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Aug 2024 01:38:14 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id f7bd5603 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 8 Aug 2024 05:38:08 +0000 (UTC) Date: Thu, 8 Aug 2024 07:38:12 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: =?utf-8?b?UmVuw6k=?= Scharfe , Junio C Hamano , Kyle Lippincott , Phillip Wood , Josh Steadmon , rsbecker@nexbridge.com, Edward Thomson Subject: [RFC PATCH v3 1/7] t: do not pass GIT_TEST_OPTS to unit tests with prove Message-ID: <78a9cc116253c8c638cc430bd0a842805105648b.1723095269.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: When using the prove target, we append GIT_TEST_OPTS to the arguments that we execute each of the tests with. This doesn't only include the intended test scripts, but also ends up passing the arguments to our unit tests. This is unintentional though as they do not even know to interpret those arguments, and is inconsistent with how we execute unit tests without prove. This isn't much of an issue because our current set of unit tests mostly ignore their arguments anyway. With the introduction of clar-based unit tests this is about to become an issue though, as these do parse their command line argument to alter behaviour. Prepare for this by passing GIT_TEST_OPTS to "run-test.sh" via an environment variable. Like this, we can conditionally forward it to our test scripts, only. --- t/Makefile | 3 ++- t/run-test.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/t/Makefile b/t/Makefile index 4c30e7c06f..d2212de0b7 100644 --- a/t/Makefile +++ b/t/Makefile @@ -68,7 +68,8 @@ failed: test -z "$$failed" || $(MAKE) $$failed prove: pre-clean check-chainlint $(TEST_LINT) - @echo "*** prove (shell & unit tests) ***"; $(CHAINLINTSUPPRESS) TEST_SHELL_PATH='$(TEST_SHELL_PATH_SQ)' $(PROVE) --exec ./run-test.sh $(GIT_PROVE_OPTS) $(T) $(UNIT_TESTS) :: $(GIT_TEST_OPTS) + @echo "*** prove (shell & unit tests) ***" + @$(CHAINLINTSUPPRESS) TEST_OPTIONS='$(GIT_TEST_OPTS)' TEST_SHELL_PATH='$(TEST_SHELL_PATH_SQ)' $(PROVE) --exec ./run-test.sh $(GIT_PROVE_OPTS) $(T) $(UNIT_TESTS) $(MAKE) clean-except-prove-cache $(T): diff --git a/t/run-test.sh b/t/run-test.sh index 13c353b91b..63328ac630 100755 --- a/t/run-test.sh +++ b/t/run-test.sh @@ -10,7 +10,7 @@ case "$1" in echo >&2 "ERROR: TEST_SHELL_PATH is empty or not set" exit 1 fi - exec "${TEST_SHELL_PATH}" "$@" + exec "${TEST_SHELL_PATH}" "$@" ${TEST_OPTIONS} ;; *) exec "$@"