From nobody Sat May 18 05:53:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76905+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76905+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1624433020; cv=none; d=zohomail.com; s=zohoarc; b=lW7hpSJ/4zMqeBSKAs8c/QuDvpdNnq1cojs9UHrF7Ox1HgxNKWf61Wvyu9X1Ia8y02DLhBx8Oc9cCs062LWmgKtls1RlkM8yHOXOTL7pDpiWDHZrVkN6fVOheWwjQQZZJyCeGa36QxiNnVamC6WdVeH81JYH6vKFtLecADXmFv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624433020; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=tNtczed7XiTGD0OtPdTKNcuK/M1gzWzX5RqIMKXbtEQ=; b=kLYgZdAzCSs6A6aJ9/fAHuvn5Na7qztvDQBAjMbezLhP2nPpDG2rNVhn8NQkK6HtDNOVEekt833q5ZD+ExuKIZXj1pLnNxR4m/iIFdvJnSgDKzfvWc2ZD4sUZmM7BBjXMqQ1WDHeqhT3OqIRh9DcJk0OQKmpWY+VByz5ytY4gAc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76905+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624433019953976.6541529722903; Wed, 23 Jun 2021 00:23:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MreaYY1788612xWMsbBheLoc; Wed, 23 Jun 2021 00:23:38 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.4394.1624433016573655187 for ; Wed, 23 Jun 2021 00:23:37 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 220681063; Wed, 23 Jun 2021 00:23:31 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7FEF03F719; Wed, 23 Jun 2021 00:23:29 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 1/4] .pytool/EccCheck: Locate BaseTools dir with EDK_TOOLS_PATH Date: Wed, 23 Jun 2021 08:22:47 +0100 Message-Id: <20210623072250.3277-2-Pierre.Gondois@arm.com> In-Reply-To: <20210623072250.3277-1-Pierre.Gondois@arm.com> References: <20210623072250.3277-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: G42UK3Mk5JBq4YDLKDgH9h8Lx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624433018; bh=qcTxvAcSrGe86xDvBwr+f/GRoRRJcwEyY8VjJPCWDq4=; h=Date:From:Reply-To:Subject:To; b=PsjCzsQDAcoVT82s8plulBb5LXGQFBkO9XIVvj2KXqe26dQs6n1r8Wlsyp0KiHPOI+4 Krs4ysxB+KJaf53ZWWoKlvrdgE5FPI9NE8R7TQnVbdIbvKsXaWNTm1mUTWq3UOYNuqPBY UxMYGzoTeAhuGQm0T7+yxuNlObm/bQoX3sU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The BaseTools directory is currently being located as a sub-directory of the WORKSPACE env var. This might not be true in other environments. Cf EDKII Build Specification, s4.1.3 "Build Process Restrictions": There is no restriction on the location of the EDK_TOOLS_PATH, it may be located within a directory identified as the WORKSPACE directory, or in any other location that is accessible on the development workstation. Locate the BaseTools directory using EDK_TOOLS_PATH instead. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Cc: Sami Mujawar Signed-off-by: Pierre Gondois --- .pytool/Plugin/EccCheck/EccCheck.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/= EccCheck.py index eee1ff7a77b5..bb93446441de 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -1,5 +1,6 @@ # @file EccCheck.py # +# Copyright (c) 2021, Arm Limited. All rights reserved.
# Copyright (c) 2020, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -61,16 +62,17 @@ class EccCheck(ICiBuildPlugin): # - output_stream the StringIO output stream from this plugin via lo= gging def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environm= ent, PLM, PLMHelper, tc, output_stream=3DNone): edk2_path =3D Edk2pathObj.WorkspacePath - python_path =3D os.path.join(edk2_path, "BaseTools", "Source", "Py= thon") + basetools_path =3D environment.GetValue("EDK_TOOLS_PATH") + python_path =3D os.path.join(basetools_path, "Source", "Python") env =3D shell_environment.GetEnvironment() env.set_shell_var('PYTHONPATH', python_path) env.set_shell_var('WORKSPACE', edk2_path) self.ECC_PASS =3D True - self.ApplyConfig(pkgconfig, edk2_path, packagename) + self.ApplyConfig(pkgconfig, edk2_path, basetools_path, packagename) modify_dir_list =3D self.GetModifyDir(packagename) patch =3D self.GetDiff(packagename) ecc_diff_range =3D self.GetDiffRange(patch, packagename, edk2_path) - self.GenerateEccReport(modify_dir_list, ecc_diff_range, edk2_path) + self.GenerateEccReport(modify_dir_list, ecc_diff_range, edk2_path,= basetools_path) ecc_log =3D os.path.join(edk2_path, "Ecc.log") self.RevertCode() if self.ECC_PASS: @@ -176,11 +178,11 @@ class EccCheck(ICiBuildPlugin): return comment_range =20 def GenerateEccReport(self, modify_dir_list: List[str], ecc_diff_range= : Dict[str, List[Tuple[int, int]]], - edk2_path: str) -> None: + edk2_path: str, basetools_path: str) -> None: ecc_need =3D False ecc_run =3D True - config =3D os.path.join(edk2_path, "BaseTools", "Source", "Python"= , "Ecc", "config.ini") - exception =3D os.path.join(edk2_path, "BaseTools", "Source", "Pyth= on", "Ecc", "exception.xml") + config =3D os.path.join(basetools_path, "Source", "Python", "Ecc",= "config.ini") + exception =3D os.path.join(basetools_path, "Source", "Python", "Ec= c", "exception.xml") report =3D os.path.join(edk2_path, "Ecc.csv") for modify_dir in modify_dir_list: target =3D os.path.join(edk2_path, modify_dir) @@ -234,7 +236,7 @@ class EccCheck(ICiBuildPlugin): log.writelines(all_line) return =20 - def ApplyConfig(self, pkgconfig: Dict[str, List[str]], edk2_path: str,= pkg: str) -> None: + def ApplyConfig(self, pkgconfig: Dict[str, List[str]], edk2_path: str,= basetools_path: str, pkg: str) -> None: if "IgnoreFiles" in pkgconfig: for a in pkgconfig["IgnoreFiles"]: a =3D os.path.join(edk2_path, pkg, a) @@ -251,7 +253,7 @@ class EccCheck(ICiBuildPlugin): =20 if "ExceptionList" in pkgconfig: exception_list =3D pkgconfig["ExceptionList"] - exception_xml =3D os.path.join(edk2_path, "BaseTools", "Source= ", "Python", "Ecc", "exception.xml") + exception_xml =3D os.path.join(basetools_path, "Source", "Pyth= on", "Ecc", "exception.xml") try: logging.info("Appending exceptions") self.AppendException(exception_list, exception_xml) --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76905): https://edk2.groups.io/g/devel/message/76905 Mute This Topic: https://groups.io/mt/83732990/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 18 05:53:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76907+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76907+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1624433025; cv=none; d=zohomail.com; s=zohoarc; b=PfoiXF/LRA0SRo/EhIo/gcVB/oT/oQRJu3q/7GdFpwbzo3ewvZomCj7XdoXknP4TMA8WbE72C12B90tpBLAMzKeP2fPCrmdqSFhC/1aK/fq02T5Z5NwxuS555qYgLBjUfUtk+/dw9Cg4P3ruXjQ3hgUzBnbA7NlLjgUT5cQcwEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624433025; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=tdhfMUoNw7so4qoUYU+dpdV3qwPhfDGlu1vaEZxJKrk=; b=IG0tvjr/H1+v6fEsFnO1beYs6z/FHsCNri+bJGwhwxO+dIgJQpq3/0EEP3NJUmercjIyAsYttDBzb3B1mlfyIZTb3b4ZSu0Fo29vgPApjmJkoX9YJdlBreoA9yYfouL2NDAEk9ZGMNrRoT6//bRUQbR5gVhMe8kHtk4dOaJjMas= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76907+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624433025515565.9736158920385; Wed, 23 Jun 2021 00:23:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rKeoYY1788612xSCVsHjhPoP; Wed, 23 Jun 2021 00:23:44 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4376.1624433018403625548 for ; Wed, 23 Jun 2021 00:23:38 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B277106F; Wed, 23 Jun 2021 00:23:33 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 80EA93F719; Wed, 23 Jun 2021 00:23:31 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 2/4] .pytool/EccCheck: Rename edk2_path as workspace_path Date: Wed, 23 Jun 2021 08:22:48 +0100 Message-Id: <20210623072250.3277-3-Pierre.Gondois@arm.com> In-Reply-To: <20210623072250.3277-1-Pierre.Gondois@arm.com> References: <20210623072250.3277-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: c7NGHp0jcAEYVxfIAQtFPRErx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624433024; bh=3PSE+kxbPdvuql/Q6orXFZjjoxPH8dfl6eMeryWktAU=; h=Date:From:Reply-To:Subject:To; b=DK50iFi1Gx/boi6M6cfGNUDxcMAUMWVQi0bAuO9X2o/hBw9upQt998LWrSk04K5LtWJ iZqnYRVw4/6eIxWuJOu0+HwEEM4YbqGvLtFMMYB2GqizgD0t1H1zbHMctN/9dFTHA0DPL tqYTfgy73vZBN6ek6sJI74jUInGyBcUwKuA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The edk2 path and the workspace path are identical when running Ecc on edk2. When running Ecc on another repository (e.g.: edk2-platforms with edk2 as a submodule of edk2-platforms), these directories are different. Indeed, in the latter configuration, Ecc must run git commands on the tested repository, i.e. the workspace directory, edk2-platforms. Thus, rename edk2_path as workspace_path. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Cc: Sami Mujawar Signed-off-by: Pierre Gondois --- .pytool/Plugin/EccCheck/EccCheck.py | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/= EccCheck.py index bb93446441de..fff317f23110 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -61,19 +61,19 @@ class EccCheck(ICiBuildPlugin): # - Junit Logger # - output_stream the StringIO output stream from this plugin via lo= gging def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environm= ent, PLM, PLMHelper, tc, output_stream=3DNone): - edk2_path =3D Edk2pathObj.WorkspacePath + workspace_path =3D Edk2pathObj.WorkspacePath basetools_path =3D environment.GetValue("EDK_TOOLS_PATH") python_path =3D os.path.join(basetools_path, "Source", "Python") env =3D shell_environment.GetEnvironment() env.set_shell_var('PYTHONPATH', python_path) - env.set_shell_var('WORKSPACE', edk2_path) + env.set_shell_var('WORKSPACE', workspace_path) self.ECC_PASS =3D True - self.ApplyConfig(pkgconfig, edk2_path, basetools_path, packagename) + self.ApplyConfig(pkgconfig, workspace_path, basetools_path, packag= ename) modify_dir_list =3D self.GetModifyDir(packagename) patch =3D self.GetDiff(packagename) - ecc_diff_range =3D self.GetDiffRange(patch, packagename, edk2_path) - self.GenerateEccReport(modify_dir_list, ecc_diff_range, edk2_path,= basetools_path) - ecc_log =3D os.path.join(edk2_path, "Ecc.log") + ecc_diff_range =3D self.GetDiffRange(patch, packagename, workspace= _path) + self.GenerateEccReport(modify_dir_list, ecc_diff_range, workspace_= path, basetools_path) + ecc_log =3D os.path.join(workspace_path, "Ecc.log") self.RevertCode() if self.ECC_PASS: tc.SetSuccess() @@ -178,24 +178,24 @@ class EccCheck(ICiBuildPlugin): return comment_range =20 def GenerateEccReport(self, modify_dir_list: List[str], ecc_diff_range= : Dict[str, List[Tuple[int, int]]], - edk2_path: str, basetools_path: str) -> None: + workspace_path: str, basetools_path: str) -> No= ne: ecc_need =3D False ecc_run =3D True config =3D os.path.join(basetools_path, "Source", "Python", "Ecc",= "config.ini") exception =3D os.path.join(basetools_path, "Source", "Python", "Ec= c", "exception.xml") - report =3D os.path.join(edk2_path, "Ecc.csv") + report =3D os.path.join(workspace_path, "Ecc.csv") for modify_dir in modify_dir_list: - target =3D os.path.join(edk2_path, modify_dir) + target =3D os.path.join(workspace_path, modify_dir) logging.info('Run ECC tool for the commit in %s' % modify_dir) ecc_need =3D True ecc_params =3D "-c {0} -e {1} -t {2} -r {3}".format(config, ex= ception, target, report) - return_code =3D RunCmd("Ecc", ecc_params, workingdir=3Dedk2_pa= th) + return_code =3D RunCmd("Ecc", ecc_params, workingdir=3Dworkspa= ce_path) if return_code !=3D 0: ecc_run =3D False break if not ecc_run: logging.error('Fail to run ECC tool') - self.ParseEccReport(ecc_diff_range, edk2_path) + self.ParseEccReport(ecc_diff_range, workspace_path) =20 if not ecc_need: logging.info("Doesn't need run ECC check") @@ -204,10 +204,10 @@ class EccCheck(ICiBuildPlugin): RunCmd("git", revert_params) return =20 - def ParseEccReport(self, ecc_diff_range: Dict[str, List[Tuple[int, int= ]]], edk2_path: str) -> None: - ecc_log =3D os.path.join(edk2_path, "Ecc.log") + def ParseEccReport(self, ecc_diff_range: Dict[str, List[Tuple[int, int= ]]], workspace_path: str) -> None: + ecc_log =3D os.path.join(workspace_path, "Ecc.log") ecc_csv =3D "Ecc.csv" - file =3D os.listdir(edk2_path) + file =3D os.listdir(workspace_path) row_lines =3D [] ignore_error_code =3D self.GetIgnoreErrorCode() if ecc_csv in file: @@ -236,10 +236,10 @@ class EccCheck(ICiBuildPlugin): log.writelines(all_line) return =20 - def ApplyConfig(self, pkgconfig: Dict[str, List[str]], edk2_path: str,= basetools_path: str, pkg: str) -> None: + def ApplyConfig(self, pkgconfig: Dict[str, List[str]], workspace_path:= str, basetools_path: str, pkg: str) -> None: if "IgnoreFiles" in pkgconfig: for a in pkgconfig["IgnoreFiles"]: - a =3D os.path.join(edk2_path, pkg, a) + a =3D os.path.join(workspace_path, pkg, a) a =3D a.replace(os.sep, "/") =20 logging.info("Ignoring Files {0}".format(a)) --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76907): https://edk2.groups.io/g/devel/message/76907 Mute This Topic: https://groups.io/mt/83732992/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 18 05:53:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76909+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76909+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1624433022; cv=none; d=zohomail.com; s=zohoarc; b=Usgu6OaFtJZgC1BqxxRitMq60t+Rf6/Ix+i+CgBV1Shpyghg4pscvSnfL07hK93rKo29LscrCY/fGwnyRHZVg6V1nzZjhMFw313iqLx8Bp/1zSXi6qpNDj9p5oFiLdZhDHOQVRZvWopYRfAxDpYymtZ8RjWCInSS4vYVLKLcqsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624433022; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=FU4PmOTC1CO5+exC215VMKL8TTXIwf+Sro56T+3PJyk=; b=bGVT3MAnoshIoWAJpIrXYz+xKKj5XZOOkbPZiwkMZaRfMNaK2q1HmdQiJkbUznJXb0OKIcms3m8YcOwcS9lQ7w4o9aFH4EY0N3aWcXu8NpFmmyE3zu+jOoNssKIKPaWbzb8BQ317K94gjxFewqMP7czmxjytIRyz2JruyOQaIPQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76909+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624433022843899.018381000128; Wed, 23 Jun 2021 00:23:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Rg3tYY1788612xs6HnAYsQrY; Wed, 23 Jun 2021 00:23:42 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.4299.1624433020276013459 for ; Wed, 23 Jun 2021 00:23:40 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E28C5113E; Wed, 23 Jun 2021 00:23:34 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5AD523F719; Wed, 23 Jun 2021 00:23:33 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 3/4] .pytool/EccCheck: Check ecc_csv exists Date: Wed, 23 Jun 2021 08:22:49 +0100 Message-Id: <20210623072250.3277-4-Pierre.Gondois@arm.com> In-Reply-To: <20210623072250.3277-1-Pierre.Gondois@arm.com> References: <20210623072250.3277-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: NdGBg74B1In5jazmfm3NFuIsx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624433022; bh=VTTAnbjzcCJ7s8rjw9oYlVWb4JJQ9dTHjFrdaHOXKKU=; h=Date:From:Reply-To:Subject:To; b=eS6QcGD5/r4i5P+Q8l6qXQkHyJeO4MSqASaj+AbUEb4jn0kORrP1fLWOfVOKWvzT86y gRCjnq/1KtVpfkG5jDS3bq2mOLy7ZLvyEjcphTK9F3g2nDS69WBlztMCBX/6Gfv5aJr26 TUvudLM/ieWv5AhSstu61d7qfp+uZKpt3lA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois 'workspace_path' being an absolute path leads to 'ecc_csv' being an absolute path. Then it won't be found among 'file' as they are relative paths. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Cc: Sami Mujawar Signed-off-by: Pierre Gondois --- .pytool/Plugin/EccCheck/EccCheck.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/= EccCheck.py index fff317f23110..87f0e65a140f 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -206,11 +206,10 @@ class EccCheck(ICiBuildPlugin): =20 def ParseEccReport(self, ecc_diff_range: Dict[str, List[Tuple[int, int= ]]], workspace_path: str) -> None: ecc_log =3D os.path.join(workspace_path, "Ecc.log") - ecc_csv =3D "Ecc.csv" - file =3D os.listdir(workspace_path) + ecc_csv =3D os.path.join(workspace_path, "Ecc.csv") row_lines =3D [] ignore_error_code =3D self.GetIgnoreErrorCode() - if ecc_csv in file: + if os.path.exists(ecc_csv): with open(ecc_csv) as csv_file: reader =3D csv.reader(csv_file) for row in reader: --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76909): https://edk2.groups.io/g/devel/message/76909 Mute This Topic: https://groups.io/mt/83732994/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 18 05:53:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76906+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76906+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1624433023; cv=none; d=zohomail.com; s=zohoarc; b=ZFejBdW9qjbEvMp+jTMUL4hyMxCNK7kYcxlFrVx6KNis0TlR+2w3bGHzN/TzdYcTpJW5nUlThwzaF3NDy6vz9HxA8JiRH1rU80SM+3jlV5mkJyn6XpqlJa0vWzVmU62otnh50dy4BzfzhwPzPdpDS8lym+ancfGltTmZ4NWFAjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624433023; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=Xe0pBb1GozvEsNajADgxWktgV8rTrhnAvaVb2eM0Gt0=; b=Fh9SO7R7pA/rPOTrHoxDz0tcyMhz6oybyGy/OIkmUlNEWKLLCLz4s1fZJ1BC9OzJ2cn0hb868rrGn2Y+TFlVgikpbJqq9iJaY9IgKMbK7rBBKGocOz+dVE7wz7sFdqhE0QQuec0JUdbr5ols9hEIYQJjIHw+PO7UJJounpcRWOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76906+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624433023837420.8027522317824; Wed, 23 Jun 2021 00:23:43 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id saWHYY1788612xTez5x6opxq; Wed, 23 Jun 2021 00:23:43 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4395.1624433017416478978 for ; Wed, 23 Jun 2021 00:23:37 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EE98711D4; Wed, 23 Jun 2021 00:23:36 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4DA733F719; Wed, 23 Jun 2021 00:23:35 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v1 4/4] .pytool/EccCheck: Set PACKAGES_PATH env var in Ecc Date: Wed, 23 Jun 2021 08:22:50 +0100 Message-Id: <20210623072250.3277-5-Pierre.Gondois@arm.com> In-Reply-To: <20210623072250.3277-1-Pierre.Gondois@arm.com> References: <20210623072250.3277-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: AVMq9PcoPY8mGcN3xfjMS66vx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624433023; bh=N6oiYEHWH7bYDNoEPWEUCxv3laj6oBcMaPz8TkUHDH0=; h=Date:From:Reply-To:Subject:To; b=Dm7ZTjJ5YIjQpBYCa0POEiPph+Rg/JWxEfnfHonpUgRG0FdYCKMxadzUSf0FZ/5ZNSk cTrlntDjSK0USiBaUkWfkEGDRsHX9iXvGPAnGm/hWpBAzj8T0bXI71zdDZNwcKvM5ASzw yFTybtdAhd4zpwfjEbJylmmQ0klVtbqPdLo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois When running Ecc on other repositories (e.g.: edk2-platforms with edk2 as a submodule), edk2 modules are referenced. E.g.: MdePkg/.. The PACKAGES_PATH env var can be used to reference other directories containing packages. Set it so that Ecc can find these packages. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Cc: Sami Mujawar Signed-off-by: Pierre Gondois --- .pytool/Plugin/EccCheck/EccCheck.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/= EccCheck.py index 87f0e65a140f..49d143b32f91 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -67,6 +67,7 @@ class EccCheck(ICiBuildPlugin): env =3D shell_environment.GetEnvironment() env.set_shell_var('PYTHONPATH', python_path) env.set_shell_var('WORKSPACE', workspace_path) + env.set_shell_var('PACKAGES_PATH', ":".join(Edk2pathObj.PackagePat= hList)) self.ECC_PASS =3D True self.ApplyConfig(pkgconfig, workspace_path, basetools_path, packag= ename) modify_dir_list =3D self.GetModifyDir(packagename) --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76906): https://edk2.groups.io/g/devel/message/76906 Mute This Topic: https://groups.io/mt/83732991/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-