From patchwork Wed Nov 1 13:03:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13442815 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 65EF412E44 for ; Wed, 1 Nov 2023 13:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="vZpsxjdM"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bKCak9gF" Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74A2103 for ; Wed, 1 Nov 2023 06:03:04 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id 52E265C0429; Wed, 1 Nov 2023 09:03:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 01 Nov 2023 09:03:04 -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:sender :subject:subject:to:to; s=fm3; t=1698843784; x=1698930184; bh=38 oBy1IBjhcoP6a36VWXeV9rcI0uvMGQM9wk0+CFs8Q=; b=vZpsxjdMCurDyiKsiW pAiWFKHE67VIvDEuQTcSIXN2ZEMKwvSauPKHyLdIIE28wnADFL9LdQffNyHQfsfJ RXJTwwONZg2oOHJC+VoNRKAETfmgArNQqYkUFeDEefU7rPXD3Hm0jPHETCFrd9B+ rSRDSEhZpd5DZfVeyinUrigauOLdVQY/QYQhjJ5Vp0Lvsc/33n9yIr+JOn877WTg dn9iHMprPEGWzRfA/VOgQb/8QPFkgjI9WuP2k7r8hN6F9qYOWkfFoxO9eBZebCat X2nhYl6AzDBnhlvI3zqK17CgvyvWqJsIV2LD/UKQHo1iBCEmK7wcQcG36NB84soT Hpvw== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698843784; x=1698930184; bh=38oBy1IBjhcoP 6a36VWXeV9rcI0uvMGQM9wk0+CFs8Q=; b=bKCak9gFLr9vqC2wYbq1LWNlssLcU XSTdYVk1wi5qCuhbgJ1uuWL27/LyJkxK2sY9gjoHWV9kek9X67R50XbxCjFCwsBw Zer3pfttqx55rcpXD7TixsBKorWmVuRSdibpK6+mhWaxEDHllmNIU3jv9/oezWTW MiISXe7m/Wgswa9jw/0XKDQk3pcJh7W59jSpho+iWsx3huMAaUyF+74eMHJ2hipl Y5B2LJxpK4By/6Z9TIhaaDdMSuyYhVDIY7pcH+1G57ncIGrPhoVTvdauPwxtVYVM fYoQ87jo6W78aIfJHIJpGxgI74FcLayPxR3xItTrAzTV7EDP9yRwgxy+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddtgedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Nov 2023 09:03:02 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a50feb2d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 1 Nov 2023 13:02:51 +0000 (UTC) Date: Wed, 1 Nov 2023 14:03:00 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Taylor Blau , Junio C Hamano , Phillip Wood , Oswald Buddenhagen , Victoria Dye Subject: [PATCH v5 5/8] ci: unify setup of some environment variables Message-ID: <6078aea246d874ba18bbd9ce2c0a7fb5c03e1564.1698843660.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: Both GitHub Actions and Azure Pipelines set up the environment variables GIT_TEST_OPTS, GIT_PROVE_OPTS and MAKEFLAGS. And while most values are actually the same, the setup is completely duplicate. With the upcoming support for GitLab CI this duplication would only extend even further. Unify the setup of those environment variables so that only the uncommon parts are separated. While at it, we also perform some additional small improvements: - We now always pass `--state=failed,slow,save` via GIT_PROVE_OPTS. It doesn't hurt on platforms where we don't persist the state, so this further reduces boilerplate. - When running on Windows systems we set `--no-chain-lint` and `--no-bin-wrappers`. Interestingly though, we did so _after_ already having exported the respective environment variables. Signed-off-by: Patrick Steinhardt --- ci/lib.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index 9ffdf743903..0b35da3cfdb 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -175,11 +175,8 @@ then # among *all* phases) cache_dir="$HOME/test-cache/$SYSTEM_PHASENAME" - export GIT_PROVE_OPTS="--timer --jobs 10 --state=failed,slow,save" - export GIT_TEST_OPTS="--verbose-log -x --write-junit-xml" - MAKEFLAGS="$MAKEFLAGS --jobs=10" - test windows_nt != "$CI_OS_NAME" || - GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS" + GIT_TEST_OPTS="--write-junit-xml" + JOBS=10 elif test true = "$GITHUB_ACTIONS" then CI_TYPE=github-actions @@ -198,17 +195,27 @@ then cache_dir="$HOME/none" - export GIT_PROVE_OPTS="--timer --jobs 10" - export GIT_TEST_OPTS="--verbose-log -x --github-workflow-markup" - MAKEFLAGS="$MAKEFLAGS --jobs=10" - test windows != "$CI_OS_NAME" || - GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS" + GIT_TEST_OPTS="--github-workflow-markup" + JOBS=10 else echo "Could not identify CI type" >&2 env >&2 exit 1 fi +MAKEFLAGS="$MAKEFLAGS --jobs=$JOBS" +GIT_PROVE_OPTS="--timer --jobs $JOBS --state=failed,slow,save" + +GIT_TEST_OPTS="$GIT_TEST_OPTS --verbose-log -x" +case "$CI_OS_NAME" in +windows|windows_nt) + GIT_TEST_OPTS="$GIT_TEST_OPTS --no-chain-lint --no-bin-wrappers" + ;; +esac + +export GIT_TEST_OPTS +export GIT_PROVE_OPTS + good_trees_file="$cache_dir/good-trees" mkdir -p "$cache_dir"