From nobody Sun May 5 14:33:37 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+77534+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+77534+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1625605001; cv=none; d=zohomail.com; s=zohoarc; b=Q5RNz9sevWLMaCj4Fw5Kpi9UV9bjsYYaM94in85h7wGQVockzEYSIiqhOrLfZq9Xsn8r5l2lfbCcpaBMzDRCfWQB0K5UtZOFz9urU39JiaVbecYfLgJD/1VCu1/JxWq8lW4XsbI99Wle03m6fhmvaDnhjPCRcXPtnPTNSlXI314= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625605001; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=PAgzfEEN4fnYf+gEwS6q5lZp5262hKj/AUpZF0k6Ukw=; b=NkaGcRkasVG3Xg23tHEbDdS90wzs5YOTyLC9gveBtxtNNyUMkVVUuf7VDzkvfbiuR6WnoneATR3GD04yfeE1CdQIrKu9FOS9Pgfe29Jm+BFyadS2P4DBZ4H7HdaJBoXKEFYzPFGMNTOPNoaMaXXJPbImaqTJ82X56VyZp9xVjks= 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+77534+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 1625605001229542.2480934632116; Tue, 6 Jul 2021 13:56:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HTDGYY1788612xFPz5cvoZgT; Tue, 06 Jul 2021 13:56:40 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12347.1625604995243806808 for ; Tue, 06 Jul 2021 13:56:35 -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 B54DE113E; Tue, 6 Jul 2021 13:56:34 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.77.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2D7573F5A1; Tue, 6 Jul 2021 13:56:32 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v2 1/4] .pytool/EccCheck: Locate BaseTools dir with EDK_TOOLS_PATH Date: Tue, 6 Jul 2021 21:55:38 +0100 Message-Id: <20210706205541.9176-2-Pierre.Gondois@arm.com> In-Reply-To: <20210706205541.9176-1-Pierre.Gondois@arm.com> References: <20210706205541.9176-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: W81eylrR6zYNCcQDMegB0uaux1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1625605000; bh=cjDSZ3AGKgIeLGNLDnymByDRkmhjuj3zjeGehrQiv6M=; h=Date:From:Reply-To:Subject:To; b=jGhBQfuV7lNIFdtwZstL8Sw5G/5GV8AJUQOzs7PG1rAUKN8sKLLONKmCsR87xrawrAe tD+3b2qyv+ogunSgew9LlborW4TGJkP+JEcwnZH0UjXEuDoKecgZ5RHsq5ekzvSg5BswR 2MXKrhrqaPJRpuA0xXB2yK/owGthRlBww0s= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1625605002713100001 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 (#77534): https://edk2.groups.io/g/devel/message/77534 Mute This Topic: https://groups.io/mt/84030564/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 Sun May 5 14:33:37 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+77535+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+77535+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1625605003; cv=none; d=zohomail.com; s=zohoarc; b=A/WuQQdboaX9o8vgZsk95CVQKOOyujOa0OGrIU/0FisVRfFlmqyX07zIC1DnKrAs0A5fIi1HiIgc7zB6cAfWNTOMStaLmUq/pRO6DjCYmagQg9QpERvYtmGrIqgAEwlPWjToyh/UIT/g4Gpqlc694JcWK4aCfubeey1bPBUZyzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625605003; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=0eS5P1YzJk8porggRfVxZCPYzr8FnVXOKUQbNLPIHL4=; b=nkGdoV+LBpSaBTtgEiUXRXENBFEjnZLpPsF0T/gWleo8r4d5eajRT3CkyWb3/Q11dQ1gRzedn1uf50XSMCz0pjlUzUnJWjhnpnjj2wLYkWKxKTEOK8/9Dg5oT8yy20WLVz92KpHYx3kw/3LxdB71St+7N8BTr7AlIylpV4+mKlk= 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+77535+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 1625605003025799.0149219778253; Tue, 6 Jul 2021 13:56:43 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SFd3YY1788612x97tgAATWJj; Tue, 06 Jul 2021 13:56:42 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12348.1625604997171862624 for ; Tue, 06 Jul 2021 13:56: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 C1C8E11D4; Tue, 6 Jul 2021 13:56:36 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.77.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 10DA63F5A1; Tue, 6 Jul 2021 13:56:34 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v2 2/4] .pytool/EccCheck: Rename edk2_path as workspace_path Date: Tue, 6 Jul 2021 21:55:39 +0100 Message-Id: <20210706205541.9176-3-Pierre.Gondois@arm.com> In-Reply-To: <20210706205541.9176-1-Pierre.Gondois@arm.com> References: <20210706205541.9176-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: OWEGwuIQaLMK25oQTaooDYgzx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1625605002; bh=ITNilTmfdai6WTee8iSRaDqeL4Cv18hPUG60zLmnH94=; h=Date:From:Reply-To:Subject:To; b=kyIka7WhzgwzaKbckkM3Agu8bEbbM2l43GgHiyzZFFk5+wb6vNvXv6ec044j5j5vfqc M9VJZiQ5QN0zy5Pu0QJstGkmhSs7lylTI9qRuPHzJshSD/pMbLdMjUJFy2mugiGKePbM9 +Rt2jFtSJZftxEYVVTOSQaDagR5TxJj385w= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1625605004644100005 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 (#77535): https://edk2.groups.io/g/devel/message/77535 Mute This Topic: https://groups.io/mt/84030566/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 Sun May 5 14:33:37 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+77536+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+77536+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1625605000; cv=none; d=zohomail.com; s=zohoarc; b=ib3AHsgWVH8+hOBq5S4Qbmaijwg+xNKzcUjDWk7GuzyMFWaCAf1gxbINW/OLh/wS9kQtAPJ+lA4ad74on3q+LIUSuI9AcS/dVUCof76vzvjUzuhP8lJ57TjcHq7NqkPbW4HbrwNuF8lRdyFA7AHz0jaQobVrck05Iy7Fg0PqJQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625605000; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=XAv+klEXNCfHiNYiBPiGFHaHtSlwy2U8ki7AW7NiLAA=; b=JMwMtHdKbdGucy0YwCKm9FRqJWqo9gbEiWdSloI3UBe1pKM4hQoDpiKw20Wcwq8YWE5oSMrosKNI/gfT5CGkqRat/LSr5SrJP22IVwti5Tx0tTS4jaDAEXw/7DtCGCY4qW7Fm6DZihMlPSFI12un/byXHO9jnANKqoYc6q1j0rA= 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+77536+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 1625605000054508.83430961161844; Tue, 6 Jul 2021 13:56:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hmYrYY1788612xwWfwLLDDA9; Tue, 06 Jul 2021 13:56:39 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12356.1625604999090344275 for ; Tue, 06 Jul 2021 13:56:39 -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 B3FBB139F; Tue, 6 Jul 2021 13:56:38 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.77.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2CB0F3F5A1; Tue, 6 Jul 2021 13:56:36 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v2 3/4] .pytool/EccCheck: Check ecc_csv exists Date: Tue, 6 Jul 2021 21:55:40 +0100 Message-Id: <20210706205541.9176-4-Pierre.Gondois@arm.com> In-Reply-To: <20210706205541.9176-1-Pierre.Gondois@arm.com> References: <20210706205541.9176-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: 6ejyICPsqChTC3MuuCAWWiDmx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1625604999; bh=bhXz6005SsyEMpvFbkCnrREzNkgtV4kUg0McW3Zq7xo=; h=Date:From:Reply-To:Subject:To; b=D43AZWFY/zpQCcF0AOtB9zCDz1BiD5DzftDqE3IgXhgkHZM5zrq9F77+dx2uQfDISFX wP8IX6UkmyhRyL7Vdus4w4Nn9z6BBfghAi74g9Z03aPAxhTFwrQElxpTQsTUL88Sc+zI3 qks1WFlPkSX/iCidBGlvw+XOfjfpSq6K7Ds= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1625605000499100008 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 (#77536): https://edk2.groups.io/g/devel/message/77536 Mute This Topic: https://groups.io/mt/84030567/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 Sun May 5 14:33:37 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+77537+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+77537+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1625605007; cv=none; d=zohomail.com; s=zohoarc; b=crBAQwVUaElL1K2UtX+oDcYQ9hXh0mY/FiU23cB9v/JA1/dasH9YNjXU742EGG4EnZmzCq083Uvp/gIfbX39HfGIh8h+PngLBPRHc7bvi9NhiKAUILUgCf4oyx8Kfnip3OEWchCf8KCCXaRDMOfYHBb4hfdXe25q6aBUOmaHG80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625605006; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=bCuNDvUGy0UaFyWoNFYzgPVNrqo6K5LIPDn98kiw03s=; b=IYtHNJgt7dM1PDyAwzg9AjbYsQh38YMKbsA/E3h9Yrq6cHU6uCbd0BcDmSkQLppKrdAAi3D/jf6nOCGlQOIr2rXmi6gmZPz34eR60pPXfGAXGzx7gVk1XfQoQWub91ZqCfWxyy4WOoA1a1C9Kj4pGEaoCIrCbvrnO2/wrCUmBpo= 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+77537+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 16256050069961022.7564990596526; Tue, 6 Jul 2021 13:56:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LPbbYY1788612xLGJsI4q9wc; Tue, 06 Jul 2021 13:56:46 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12349.1625605001097711616 for ; Tue, 06 Jul 2021 13:56:41 -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 BFB2B106F; Tue, 6 Jul 2021 13:56:40 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.77.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1E8803F5A1; Tue, 6 Jul 2021 13:56:38 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sean Brogan , Bret Barkelew , Michael D Kinney , Liming Gao , Sami Mujawar Subject: [edk2-devel] [PATCH v2 4/4] .pytool/EccCheck: Set PACKAGES_PATH env var in Ecc Date: Tue, 6 Jul 2021 21:55:41 +0100 Message-Id: <20210706205541.9176-5-Pierre.Gondois@arm.com> In-Reply-To: <20210706205541.9176-1-Pierre.Gondois@arm.com> References: <20210706205541.9176-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: NQI1TSNDh0c8yQaW52V6aEGFx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1625605006; bh=X7L2KnHWPPkfsGkPOGeNToR4V5JkJqrmJcUb1jrGuak=; h=Date:From:Reply-To:Subject:To; b=vcrnpR347mkSg1zJcvJoVHf3mS4o5xo43uF/l2sXdsNp2zfKwrh12ZM3GnftDFt8U7T Z8omzSM+rKfPytJoRlAGw9n3yi2j6KdwB4uwnluFDzO2Vc4qW6RG2rH25rcPXKGNsv4n9 ouHe37YDq39NJkZokmGdnD/SITU2Tb91ALs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1625605008972100001 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 Reviewed-by: Bob Feng --- Notes: v2: - Use ';' path separator for Windows host [Liming] .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..2d0612269b2e 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', os.pathsep.join(Edk2pathObj.Pac= kagePathList)) 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 (#77537): https://edk2.groups.io/g/devel/message/77537 Mute This Topic: https://groups.io/mt/84030568/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-