* [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support @ 2023-02-01 14:47 Marvin Häuser 2023-02-01 18:09 ` Pedro Falcato ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Marvin Häuser @ 2023-02-01 14:47 UTC (permalink / raw) To: devel Cc: Marvin Häuser, Sean Brogan, Michael Kubacki, Michael D Kinney, Liming Gao, Pedro Falcato REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 EccBuild currently assumes all packages reside in WORKSPACE. However, this is obviously not the case for many setups. Most notably, Ext4Pkg is located in edk2-platforms/Features and thus cannot be in WORKSPACE in any reasonable setup. Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Pedro Falcato <pedro.falcato@gmail.com> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> --- .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py index 4fbc67765fdf..7235fcb55cea 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) self.ECC_PASS = True + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) + + if abs_pkg_path is None: + tc.SetSkipped() + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) + return 0 + # Create temp directory temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') try: @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): shutil.rmtree(temp_path) # Copy package being scanned to temp_path shutil.copytree ( - os.path.join(workspace_path, packagename), + abs_pkg_path, os.path.join(temp_path, packagename), symlinks=True ) -- 2.39.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-01 14:47 [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support Marvin Häuser @ 2023-02-01 18:09 ` Pedro Falcato 2023-02-01 19:56 ` Michael D Kinney 2023-02-02 1:04 ` Michael Kubacki 2 siblings, 0 replies; 7+ messages in thread From: Pedro Falcato @ 2023-02-01 18:09 UTC (permalink / raw) To: Marvin Häuser Cc: devel, Sean Brogan, Michael Kubacki, Michael D Kinney, Liming Gao On Wed, Feb 1, 2023 at 2:48 PM Marvin Häuser <mhaeuser@posteo.de> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 > > EccBuild currently assumes all packages reside in WORKSPACE. However, > this is obviously not the case for many setups. Most notably, Ext4Pkg > is located in edk2-platforms/Features and thus cannot be in WORKSPACE > in any reasonable setup. > > Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. > > Cc: Sean Brogan <sean.brogan@microsoft.com> > Cc: Michael Kubacki <mikuback@linux.microsoft.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Pedro Falcato <pedro.falcato@gmail.com> > Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> > --- > .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py > index 4fbc67765fdf..7235fcb55cea 100644 > --- a/.pytool/Plugin/EccCheck/EccCheck.py > +++ b/.pytool/Plugin/EccCheck/EccCheck.py > @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): > env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) > self.ECC_PASS = True > > + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) > + > + if abs_pkg_path is None: > + tc.SetSkipped() > + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) > + return 0 > + > # Create temp directory > temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') > try: > @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): > shutil.rmtree(temp_path) > # Copy package being scanned to temp_path > shutil.copytree ( > - os.path.join(workspace_path, packagename), > + abs_pkg_path, > os.path.join(temp_path, packagename), > symlinks=True > ) > -- > 2.39.1 > FWIW, Acked-by: Pedro Falcato <pedro.falcato@gmail.com> Please merge this so we can get edk2-platforms CI on Ext4Pkg. -- Pedro ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-01 14:47 [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support Marvin Häuser 2023-02-01 18:09 ` Pedro Falcato @ 2023-02-01 19:56 ` Michael D Kinney 2023-02-07 12:48 ` Marvin Häuser 2023-02-02 1:04 ` Michael Kubacki 2 siblings, 1 reply; 7+ messages in thread From: Michael D Kinney @ 2023-02-01 19:56 UTC (permalink / raw) To: Marvin Häuser, devel@edk2.groups.io, Feng, Bob C, Chen, Christine Cc: Sean Brogan, Michael Kubacki, Gao, Liming, Pedro Falcato, Kinney, Michael D +Bob +Christine > -----Original Message----- > From: Marvin Häuser <mhaeuser@posteo.de> > Sent: Wednesday, February 1, 2023 6:48 AM > To: devel@edk2.groups.io > Cc: Marvin Häuser <mhaeuser@posteo.de>; Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki > <mikuback@linux.microsoft.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > <gaoliming@byosoft.com.cn>; Pedro Falcato <pedro.falcato@gmail.com> > Subject: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 > > EccBuild currently assumes all packages reside in WORKSPACE. However, > this is obviously not the case for many setups. Most notably, Ext4Pkg > is located in edk2-platforms/Features and thus cannot be in WORKSPACE > in any reasonable setup. > > Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. > > Cc: Sean Brogan <sean.brogan@microsoft.com> > Cc: Michael Kubacki <mikuback@linux.microsoft.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Pedro Falcato <pedro.falcato@gmail.com> > Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> > --- > .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py > index 4fbc67765fdf..7235fcb55cea 100644 > --- a/.pytool/Plugin/EccCheck/EccCheck.py > +++ b/.pytool/Plugin/EccCheck/EccCheck.py > @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): > env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) > self.ECC_PASS = True > > + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) > + > + if abs_pkg_path is None: > + tc.SetSkipped() > + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) > + return 0 > + > # Create temp directory > temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') > try: > @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): > shutil.rmtree(temp_path) > # Copy package being scanned to temp_path > shutil.copytree ( > - os.path.join(workspace_path, packagename), > + abs_pkg_path, > os.path.join(temp_path, packagename), > symlinks=True > ) > -- > 2.39.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-01 19:56 ` Michael D Kinney @ 2023-02-07 12:48 ` Marvin Häuser 2023-02-08 7:33 ` [edk2-devel] " Michael D Kinney 0 siblings, 1 reply; 7+ messages in thread From: Marvin Häuser @ 2023-02-07 12:48 UTC (permalink / raw) To: Kinney, Michael D Cc: devel@edk2.groups.io, Feng, Bob C, Chen, Christine, Sean Brogan, Michael Kubacki, Gao, Liming, Pedro Falcato Hi Mike, This patch was reviewed by Michael Kubacki. It is required to enable edk2-platforms CI for Ext4Pkg, upstream workarounds on the edk2-platforms side would be *very* ugly. Also, the change is trivial and basically just a copy-and-paste from other pytools. Can we please merge this into the next stable tag? Best regards, Marvin > On 1. Feb 2023, at 20:56, Kinney, Michael D <michael.d.kinney@intel.com> wrote: > > +Bob > +Christine > > >> -----Original Message----- >> From: Marvin Häuser <mhaeuser@posteo.de> >> Sent: Wednesday, February 1, 2023 6:48 AM >> To: devel@edk2.groups.io >> Cc: Marvin Häuser <mhaeuser@posteo.de>; Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki >> <mikuback@linux.microsoft.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming >> <gaoliming@byosoft.com.cn>; Pedro Falcato <pedro.falcato@gmail.com> >> Subject: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 >> >> EccBuild currently assumes all packages reside in WORKSPACE. However, >> this is obviously not the case for many setups. Most notably, Ext4Pkg >> is located in edk2-platforms/Features and thus cannot be in WORKSPACE >> in any reasonable setup. >> >> Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. >> >> Cc: Sean Brogan <sean.brogan@microsoft.com> >> Cc: Michael Kubacki <mikuback@linux.microsoft.com> >> Cc: Michael D Kinney <michael.d.kinney@intel.com> >> Cc: Liming Gao <gaoliming@byosoft.com.cn> >> Cc: Pedro Falcato <pedro.falcato@gmail.com> >> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> >> --- >> .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py >> index 4fbc67765fdf..7235fcb55cea 100644 >> --- a/.pytool/Plugin/EccCheck/EccCheck.py >> +++ b/.pytool/Plugin/EccCheck/EccCheck.py >> @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): >> env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) >> self.ECC_PASS = True >> >> + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) >> + >> + if abs_pkg_path is None: >> + tc.SetSkipped() >> + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) >> + return 0 >> + >> # Create temp directory >> temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') >> try: >> @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): >> shutil.rmtree(temp_path) >> # Copy package being scanned to temp_path >> shutil.copytree ( >> - os.path.join(workspace_path, packagename), >> + abs_pkg_path, >> os.path.join(temp_path, packagename), >> symlinks=True >> ) >> -- >> 2.39.1 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-07 12:48 ` Marvin Häuser @ 2023-02-08 7:33 ` Michael D Kinney 2023-02-08 20:24 ` Michael D Kinney 0 siblings, 1 reply; 7+ messages in thread From: Michael D Kinney @ 2023-02-08 7:33 UTC (permalink / raw) To: devel@edk2.groups.io, mhaeuser@posteo.de Cc: Feng, Bob C, Chen, Christine, Sean Brogan, Michael Kubacki, Gao, Liming, Pedro Falcato, Kinney, Michael D I will merge tomorrow. Mike > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin Häuser > Sent: Tuesday, February 7, 2023 4:49 AM > To: Kinney, Michael D <michael.d.kinney@intel.com> > Cc: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan > <sean.brogan@microsoft.com>; Michael Kubacki <mikuback@linux.microsoft.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Pedro Falcato > <pedro.falcato@gmail.com> > Subject: Re: [edk2-devel] [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > > Hi Mike, > > This patch was reviewed by Michael Kubacki. It is required to enable edk2-platforms CI for Ext4Pkg, upstream workarounds on the > edk2-platforms side would be *very* ugly. Also, the change is trivial and basically just a copy-and-paste from other pytools. Can we > please merge this into the next stable tag? > > Best regards, > Marvin > > > On 1. Feb 2023, at 20:56, Kinney, Michael D <michael.d.kinney@intel.com> wrote: > > > > +Bob > > +Christine > > > > > >> -----Original Message----- > >> From: Marvin Häuser <mhaeuser@posteo.de> > >> Sent: Wednesday, February 1, 2023 6:48 AM > >> To: devel@edk2.groups.io > >> Cc: Marvin Häuser <mhaeuser@posteo.de>; Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki > >> <mikuback@linux.microsoft.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > >> <gaoliming@byosoft.com.cn>; Pedro Falcato <pedro.falcato@gmail.com> > >> Subject: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > >> > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 > >> > >> EccBuild currently assumes all packages reside in WORKSPACE. However, > >> this is obviously not the case for many setups. Most notably, Ext4Pkg > >> is located in edk2-platforms/Features and thus cannot be in WORKSPACE > >> in any reasonable setup. > >> > >> Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. > >> > >> Cc: Sean Brogan <sean.brogan@microsoft.com> > >> Cc: Michael Kubacki <mikuback@linux.microsoft.com> > >> Cc: Michael D Kinney <michael.d.kinney@intel.com> > >> Cc: Liming Gao <gaoliming@byosoft.com.cn> > >> Cc: Pedro Falcato <pedro.falcato@gmail.com> > >> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> > >> --- > >> .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- > >> 1 file changed, 8 insertions(+), 1 deletion(-) > >> > >> diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py > >> index 4fbc67765fdf..7235fcb55cea 100644 > >> --- a/.pytool/Plugin/EccCheck/EccCheck.py > >> +++ b/.pytool/Plugin/EccCheck/EccCheck.py > >> @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): > >> env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) > >> self.ECC_PASS = True > >> > >> + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) > >> + > >> + if abs_pkg_path is None: > >> + tc.SetSkipped() > >> + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) > >> + return 0 > >> + > >> # Create temp directory > >> temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') > >> try: > >> @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): > >> shutil.rmtree(temp_path) > >> # Copy package being scanned to temp_path > >> shutil.copytree ( > >> - os.path.join(workspace_path, packagename), > >> + abs_pkg_path, > >> os.path.join(temp_path, packagename), > >> symlinks=True > >> ) > >> -- > >> 2.39.1 > > > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-08 7:33 ` [edk2-devel] " Michael D Kinney @ 2023-02-08 20:24 ` Michael D Kinney 0 siblings, 0 replies; 7+ messages in thread From: Michael D Kinney @ 2023-02-08 20:24 UTC (permalink / raw) To: devel@edk2.groups.io, mhaeuser@posteo.de Cc: Feng, Bob C, Chen, Christine, Sean Brogan, Michael Kubacki, Gao, Liming, Pedro Falcato, Kinney, Michael D Merged https://github.com/tianocore/edk2/pull/4018 Commit: https://github.com/tianocore/edk2/commit/b59e6fdae2545b45c36c8c5373f4b858fb83c8cd Mike > -----Original Message----- > From: Kinney, Michael D <michael.d.kinney@intel.com> > Sent: Tuesday, February 7, 2023 11:33 PM > To: devel@edk2.groups.io; mhaeuser@posteo.de > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Michael > Kubacki <mikuback@linux.microsoft.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Pedro Falcato <pedro.falcato@gmail.com>; Kinney, > Michael D <michael.d.kinney@intel.com> > Subject: RE: [edk2-devel] [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > > I will merge tomorrow. > > Mike > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin Häuser > > Sent: Tuesday, February 7, 2023 4:49 AM > > To: Kinney, Michael D <michael.d.kinney@intel.com> > > Cc: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan > > <sean.brogan@microsoft.com>; Michael Kubacki <mikuback@linux.microsoft.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Pedro Falcato > > <pedro.falcato@gmail.com> > > Subject: Re: [edk2-devel] [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > > > > Hi Mike, > > > > This patch was reviewed by Michael Kubacki. It is required to enable edk2-platforms CI for Ext4Pkg, upstream workarounds on the > > edk2-platforms side would be *very* ugly. Also, the change is trivial and basically just a copy-and-paste from other pytools. Can > we > > please merge this into the next stable tag? > > > > Best regards, > > Marvin > > > > > On 1. Feb 2023, at 20:56, Kinney, Michael D <michael.d.kinney@intel.com> wrote: > > > > > > +Bob > > > +Christine > > > > > > > > >> -----Original Message----- > > >> From: Marvin Häuser <mhaeuser@posteo.de> > > >> Sent: Wednesday, February 1, 2023 6:48 AM > > >> To: devel@edk2.groups.io > > >> Cc: Marvin Häuser <mhaeuser@posteo.de>; Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki > > >> <mikuback@linux.microsoft.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > > >> <gaoliming@byosoft.com.cn>; Pedro Falcato <pedro.falcato@gmail.com> > > >> Subject: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support > > >> > > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 > > >> > > >> EccBuild currently assumes all packages reside in WORKSPACE. However, > > >> this is obviously not the case for many setups. Most notably, Ext4Pkg > > >> is located in edk2-platforms/Features and thus cannot be in WORKSPACE > > >> in any reasonable setup. > > >> > > >> Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. > > >> > > >> Cc: Sean Brogan <sean.brogan@microsoft.com> > > >> Cc: Michael Kubacki <mikuback@linux.microsoft.com> > > >> Cc: Michael D Kinney <michael.d.kinney@intel.com> > > >> Cc: Liming Gao <gaoliming@byosoft.com.cn> > > >> Cc: Pedro Falcato <pedro.falcato@gmail.com> > > >> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> > > >> --- > > >> .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- > > >> 1 file changed, 8 insertions(+), 1 deletion(-) > > >> > > >> diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py > > >> index 4fbc67765fdf..7235fcb55cea 100644 > > >> --- a/.pytool/Plugin/EccCheck/EccCheck.py > > >> +++ b/.pytool/Plugin/EccCheck/EccCheck.py > > >> @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): > > >> env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) > > >> self.ECC_PASS = True > > >> > > >> + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) > > >> + > > >> + if abs_pkg_path is None: > > >> + tc.SetSkipped() > > >> + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) > > >> + return 0 > > >> + > > >> # Create temp directory > > >> temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') > > >> try: > > >> @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): > > >> shutil.rmtree(temp_path) > > >> # Copy package being scanned to temp_path > > >> shutil.copytree ( > > >> - os.path.join(workspace_path, packagename), > > >> + abs_pkg_path, > > >> os.path.join(temp_path, packagename), > > >> symlinks=True > > >> ) > > >> -- > > >> 2.39.1 > > > > > > > > > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support 2023-02-01 14:47 [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support Marvin Häuser 2023-02-01 18:09 ` Pedro Falcato 2023-02-01 19:56 ` Michael D Kinney @ 2023-02-02 1:04 ` Michael Kubacki 2 siblings, 0 replies; 7+ messages in thread From: Michael Kubacki @ 2023-02-02 1:04 UTC (permalink / raw) To: Marvin Häuser, devel Cc: Sean Brogan, Michael D Kinney, Liming Gao, Pedro Falcato Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> On 2/1/2023 9:47 AM, Marvin Häuser wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326 > > EccBuild currently assumes all packages reside in WORKSPACE. However, > this is obviously not the case for many setups. Most notably, Ext4Pkg > is located in edk2-platforms/Features and thus cannot be in WORKSPACE > in any reasonable setup. > > Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH. > > Cc: Sean Brogan <sean.brogan@microsoft.com> > Cc: Michael Kubacki <mikuback@linux.microsoft.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Pedro Falcato <pedro.falcato@gmail.com> > Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> > --- > .pytool/Plugin/EccCheck/EccCheck.py | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py > index 4fbc67765fdf..7235fcb55cea 100644 > --- a/.pytool/Plugin/EccCheck/EccCheck.py > +++ b/.pytool/Plugin/EccCheck/EccCheck.py > @@ -69,6 +69,13 @@ class EccCheck(ICiBuildPlugin): > env.set_shell_var('PACKAGES_PATH', os.pathsep.join(Edk2pathObj.PackagePathList)) > self.ECC_PASS = True > > + abs_pkg_path = Edk2pathObj.GetAbsolutePathOnThisSystemFromEdk2RelativePath(packagename) > + > + if abs_pkg_path is None: > + tc.SetSkipped() > + tc.LogStdError("No Package folder {0}".format(abs_pkg_path)) > + return 0 > + > # Create temp directory > temp_path = os.path.join(workspace_path, 'Build', '.pytool', 'Plugin', 'EccCheck') > try: > @@ -77,7 +84,7 @@ class EccCheck(ICiBuildPlugin): > shutil.rmtree(temp_path) > # Copy package being scanned to temp_path > shutil.copytree ( > - os.path.join(workspace_path, packagename), > + abs_pkg_path, > os.path.join(temp_path, packagename), > symlinks=True > ) ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-08 20:24 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-02-01 14:47 [PATCH 1/1] .pytool/Plugin/EccCheck: Add PACKAGES_PATH support Marvin Häuser 2023-02-01 18:09 ` Pedro Falcato 2023-02-01 19:56 ` Michael D Kinney 2023-02-07 12:48 ` Marvin Häuser 2023-02-08 7:33 ` [edk2-devel] " Michael D Kinney 2023-02-08 20:24 ` Michael D Kinney 2023-02-02 1:04 ` Michael Kubacki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox