From nobody Thu May 16 22:59:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1700487031032593.3989123552986; Mon, 20 Nov 2023 05:30:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.636722.992435 (Exim 4.92) (envelope-from ) id 1r54Ll-00063n-8Q; Mon, 20 Nov 2023 13:30:05 +0000 Received: by outflank-mailman (output) from mailman id 636722.992435; Mon, 20 Nov 2023 13:30:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r54Ll-00063L-5Q; Mon, 20 Nov 2023 13:30:05 +0000 Received: by outflank-mailman (input) for mailman id 636722; Mon, 20 Nov 2023 13:30:03 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r54Lj-0005hA-Hq for xen-devel@lists.xenproject.org; Mon, 20 Nov 2023 13:30:03 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e8856dab-87a8-11ee-98df-6d05b1d4d9a1; Mon, 20 Nov 2023 14:30:02 +0100 (CET) Received: from beta.station (net-37-182-35-120.cust.vodafonedsl.it [37.182.35.120]) by support.bugseng.com (Postfix) with ESMTPSA id 7528D4EE0739; Mon, 20 Nov 2023 14:30:01 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e8856dab-87a8-11ee-98df-6d05b1d4d9a1 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH] automation/eclair: improve scheduled analyses Date: Mon, 20 Nov 2023 14:29:14 +0100 Message-Id: <54204ba682f4a5dc6fb8202b593d9562caff6d06.1700486902.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1700487031792100001 Content-Type: text/plain; charset="utf-8" The scheduled analyses are intended to maintain an overall vision of the MISRA complaince of the entire project. For this reason, the file exclusions in "out_of_scope.ecl" should not be applied. This patch amends ECLAIR settings to prevent exempting files for scheduled analyses and prevents scheduled pipelines from triggering non-analysis jobs. Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/action.settings | 2 +- automation/eclair_analysis/ECLAIR/analysis.ecl | 12 ++++++++++-- automation/gitlab-ci/analyze.yaml | 2 ++ automation/gitlab-ci/build.yaml | 4 ++++ automation/gitlab-ci/test.yaml | 18 ++++++++++++------ 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation= /eclair_analysis/ECLAIR/action.settings index f96368ffc7..3cba1a3afb 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -134,7 +134,7 @@ push) badgeLabel=3D"ECLAIR ${ANALYSIS_KIND} ${ref}${variantHeadline} #${jobI= d}" ;; auto_pull_request) - git remote remove autoPRRemote || true + git remote remove autoPRRemote 2>/dev/null || true git remote add autoPRRemote "${autoPRRemoteUrl}" git fetch -q autoPRRemote subDir=3D"${ref}" diff --git a/automation/eclair_analysis/ECLAIR/analysis.ecl b/automation/ec= lair_analysis/ECLAIR/analysis.ecl index fe418d6da1..2507a8e787 100644 --- a/automation/eclair_analysis/ECLAIR/analysis.ecl +++ b/automation/eclair_analysis/ECLAIR/analysis.ecl @@ -2,7 +2,13 @@ -project_name=3Dgetenv("ECLAIR_PROJECT_NAME") -project_root=3Dgetenv("ECLAIR_PROJECT_ROOT") =20 --setq=3Ddata_dir,getenv("ECLAIR_DATA_DIR") +setq(data_dir,getenv("ECLAIR_DATA_DIR")) +setq(analysis_kind,getenv("ANALYSIS_KIND")) +setq(scheduled_analysis,nil) + +strings_map("scheduled-analysis",500,"","^.*scheduled$",0,setq(scheduled_a= nalysis,t)) +strings_map("scheduled-analysis",500,"","^.*$",0) +map_strings("scheduled-analysis",analysis_kind) =20 -verbose =20 @@ -15,7 +21,9 @@ =20 -eval_file=3Dtoolchain.ecl -eval_file=3Dpublic_APIs.ecl --eval_file=3Dout_of_scope.ecl +if(scheduled_analysis, + eval_file("out_of_scope.ecl") +) -eval_file=3Ddeviations.ecl -eval_file=3Dcall_properties.ecl -eval_file=3Dtagging.ecl diff --git a/automation/gitlab-ci/analyze.yaml b/automation/gitlab-ci/analy= ze.yaml index bd9a68de31..6631db53fa 100644 --- a/automation/gitlab-ci/analyze.yaml +++ b/automation/gitlab-ci/analyze.yaml @@ -28,6 +28,8 @@ extends: .eclair-analysis allow_failure: true rules: + - if: $CI_PIPELINE_SOURCE =3D=3D "schedule" + when: never - if: $WTOKEN && $CI_PROJECT_PATH =3D~ /^xen-project\/people\/.*$/ when: manual - !reference [.eclair-analysis, rules] diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index 32af30cced..6b2ac97248 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -1,6 +1,10 @@ .build-tmpl: &build stage: build image: registry.gitlab.com/xen-project/xen/${CONTAINER} + rules: + - if: $CI_PIPELINE_SOURCE =3D=3D "schedule" + when: never + - when: always script: - ./automation/scripts/build 2>&1 | tee build.log artifacts: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 61e642cce0..47fc8cb3eb 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -1,6 +1,10 @@ .test-jobs-common: stage: test image: registry.gitlab.com/xen-project/xen/${CONTAINER} + rules: + - if: $CI_PIPELINE_SOURCE =3D=3D "schedule" + when: never + - when: always =20 .arm64-test-needs: &arm64-test-needs - alpine-3.18-arm64-rootfs-export @@ -90,9 +94,10 @@ - '*.log' - '*.dtb' when: always - only: - variables: - - $XILINX_JOBS =3D=3D "true" && $CI_COMMIT_REF_PROTECTED =3D=3D "tru= e" + rules: + - if: $XILINX_JOBS =3D=3D "true" && $CI_COMMIT_REF_PROTECTED =3D=3D "t= rue" + when: always + - !reference [.test-jobs-common, rules] tags: - xilinx =20 @@ -110,9 +115,10 @@ - smoke.serial - '*.log' when: always - only: - variables: - - $QUBES_JOBS =3D=3D "true" && $CI_COMMIT_REF_PROTECTED =3D=3D "true" + rules: + - if: $QUBES_JOBS =3D=3D "true" && $CI_COMMIT_REF_PROTECTED =3D=3D "tr= ue" + when: always + - !reference [.test-jobs-common, rules] tags: - qubes-hw2 =20 --=20 2.34.1