public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix build report issue.
@ 2019-01-16 15:29 Feng, Bob C
  2019-01-17 15:37 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Feng, Bob C @ 2019-01-16 15:29 UTC (permalink / raw)
  To: edk2-devel; +Cc: Bob Feng, Liming Gao

The Pcd Array feature changes the Pcd Default value
data structure which is used by build report. This
patch is going to update build report to adapt that change.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Source/Python/build/BuildReport.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 654a69e05c..ae37a6ce0e 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1243,13 +1243,15 @@ class PcdReport(object):
                         Value = '{} ({:d})'.format(Value, int(Value, 0))
                     else:
                         Value = "0x{:X} ({})".format(int(Value, 0), Value)
                 FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', Value))
             if IsStructure:
-                self.PrintStructureInfo(File, Pcd.DefaultValues)
+                for filedvalues in Pcd.DefaultValues.values():
+                    self.PrintStructureInfo(File, filedvalues)
         if DecMatch and IsStructure:
-            self.PrintStructureInfo(File, Pcd.DefaultValues)
+            for filedvalues in Pcd.DefaultValues.values():
+                self.PrintStructureInfo(File, filedvalues)
 
     def PrintPcdValue(self, File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, Flag = '  '):
         if not Pcd.SkuInfoList:
             Value = Pcd.DefaultValue
             IsByteArray, ArrayList = ByteArrayForamt(Value)
-- 
2.19.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: Fix build report issue.
  2019-01-16 15:29 [Patch] BaseTools: Fix build report issue Feng, Bob C
@ 2019-01-17 15:37 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2019-01-17 15:37 UTC (permalink / raw)
  To: Feng, Bob C, edk2-devel@lists.01.org

The patch is good. Reviewed-by: Liming Gao <liming.gao@intel.com>

Please add BZ number URL when push it. 

Thanks
Liming
> -----Original Message-----
> From: Feng, Bob C
> Sent: Wednesday, January 16, 2019 11:30 PM
> To: edk2-devel@lists.01.org
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [Patch] BaseTools: Fix build report issue.
> 
> The Pcd Array feature changes the Pcd Default value
> data structure which is used by build report. This
> patch is going to update build report to adapt that change.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> ---
>  BaseTools/Source/Python/build/BuildReport.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
> index 654a69e05c..ae37a6ce0e 100644
> --- a/BaseTools/Source/Python/build/BuildReport.py
> +++ b/BaseTools/Source/Python/build/BuildReport.py
> @@ -1243,13 +1243,15 @@ class PcdReport(object):
>                          Value = '{} ({:d})'.format(Value, int(Value, 0))
>                      else:
>                          Value = "0x{:X} ({})".format(int(Value, 0), Value)
>                  FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', Value))
>              if IsStructure:
> -                self.PrintStructureInfo(File, Pcd.DefaultValues)
> +                for filedvalues in Pcd.DefaultValues.values():
> +                    self.PrintStructureInfo(File, filedvalues)
>          if DecMatch and IsStructure:
> -            self.PrintStructureInfo(File, Pcd.DefaultValues)
> +            for filedvalues in Pcd.DefaultValues.values():
> +                self.PrintStructureInfo(File, filedvalues)
> 
>      def PrintPcdValue(self, File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue,
> DecMatch, DecDefaultValue, Flag = '  '):
>          if not Pcd.SkuInfoList:
>              Value = Pcd.DefaultValue
>              IsByteArray, ArrayList = ByteArrayForamt(Value)
> --
> 2.19.1.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-17 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-16 15:29 [Patch] BaseTools: Fix build report issue Feng, Bob C
2019-01-17 15:37 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox