diff options
author | zhijufan <zhijux.fan@intel.com> | 2018-09-06 13:53:18 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-09-13 09:28:55 +0800 |
commit | 7c41b8135de692ea45334747b73936ea6804622f (patch) | |
tree | 999e55f2f59707517c6bb2166b48247e0df7f57f /BaseTools | |
parent | eb2afe08cec34cf1e2a9e6f39c6adc9c66b2498a (diff) | |
download | edk2-7c41b8135de692ea45334747b73936ea6804622f.zip edk2-7c41b8135de692ea45334747b73936ea6804622f.tar.gz edk2-7c41b8135de692ea45334747b73936ea6804622f.tar.bz2 |
BaseTools: Align the boolean type PCD value's display in the report
This patch align the boolean type PCD value's display in the build
report. Original it may display 0x0, also may use 0 for the same PCD.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index a598d64..c7fa1b9 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1014,7 +1014,7 @@ class PcdReport(object): First = False
- if Pcd.DatumType in TAB_PCD_CLEAN_NUMERIC_TYPES:
+ if Pcd.DatumType in TAB_PCD_NUMERIC_TYPES:
PcdValueNumber = int(PcdValue.strip(), 0)
if DecDefaultValue is None:
DecMatch = True
@@ -1102,6 +1102,15 @@ class PcdReport(object): #
# Report PCD item according to their override relationship
#
+ if Pcd.DatumType == 'BOOLEAN':
+ if DscDefaultValue:
+ DscDefaultValue = str(int(DscDefaultValue, 0))
+ if DecDefaultValue:
+ DecDefaultValue = str(int(DecDefaultValue, 0))
+ if InfDefaultValue:
+ InfDefaultValue = str(int(InfDefaultValue, 0))
+ if Pcd.DefaultValue:
+ Pcd.DefaultValue = str(int(Pcd.DefaultValue, 0))
if DecMatch:
self.PrintPcdValue(File, Pcd, PcdTokenCName, TypeName, IsStructure, DscMatch, DscDefaultValBak, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue, ' ')
elif InfDefaultValue and InfMatch:
@@ -1126,9 +1135,11 @@ class PcdReport(object): ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})
for ModulePath in ModuleOverride:
ModuleDefault = ModuleOverride[ModulePath]
- if Pcd.DatumType in TAB_PCD_CLEAN_NUMERIC_TYPES:
+ if Pcd.DatumType in TAB_PCD_NUMERIC_TYPES:
ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
Match = (ModulePcdDefaultValueNumber == PcdValueNumber)
+ if Pcd.DatumType == 'BOOLEAN':
+ ModuleDefault = str(ModulePcdDefaultValueNumber)
else:
Match = (ModuleDefault.strip() == PcdValue.strip())
if Match:
@@ -1247,6 +1258,8 @@ class PcdReport(object): for DefaultStore in DefaultStoreList:
Value = SkuInfo.DefaultStoreDict[DefaultStore]
IsByteArray, ArrayList = ByteArrayForamt(Value)
+ if Pcd.DatumType == 'BOOLEAN':
+ Value = str(int(Value, 0))
if FirstPrint:
FirstPrint = False
if IsByteArray:
@@ -1309,6 +1322,8 @@ class PcdReport(object): else:
Value = SkuInfo.DefaultValue
IsByteArray, ArrayList = ByteArrayForamt(Value)
+ if Pcd.DatumType == 'BOOLEAN':
+ Value = str(int(Value, 0))
if FirstPrint:
FirstPrint = False
if IsByteArray:
|