summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/BuildReport.py
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-08-24 16:39:14 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 09:57:13 +0800
commit8be15c61e88709c55970c5d5272d19bd9bba67fb (patch)
tree0824e902da705ba8eb6a30d590fc2e27fd95ee73 /BaseTools/Source/Python/build/BuildReport.py
parent0e3bfc6f7a2b7b52cb684736d878e249edbff5cb (diff)
downloadedk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.tar.gz
edk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.tar.bz2
edk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.zip
BaseTools: Fix some build and report file issue
1. increment build not skip make file when not change any file 2. report file generate abundant blank line 3. Build encounter Database is locked on some platform, using database auto commit 4. Fv BaseAddress must have if set Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build/BuildReport.py')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index fd9294287f..06cf419931 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -79,7 +79,7 @@ gGlueLibEntryPoint = re.compile(r"__EDKII_GLUE_MODULE_ENTRY_POINT__\s*=\s*(\w+)"
gLineMaxLength = 120
## Tags for end of line in report
-gEndOfLine = "\r\n"
+gEndOfLine = "\n"
## Tags for section start, end and separator
gSectionStart = ">" + "=" * (gLineMaxLength - 2) + "<"
@@ -1031,7 +1031,10 @@ class PcdReport(object):
if Pcd.DatumType in TAB_PCD_NUMERIC_TYPES:
- PcdValueNumber = int(PcdValue.strip(), 0)
+ try:
+ PcdValueNumber = int(PcdValue.strip(), 0)
+ except:
+ PcdValueNumber = int(PcdValue.lstrip('0'))
if DecDefaultValue is None:
DecMatch = True
else:
@@ -1047,7 +1050,10 @@ class PcdReport(object):
if DscDefaultValue is None:
DscMatch = True
else:
- DscDefaultValueNumber = int(DscDefaultValue.strip(), 0)
+ try:
+ DscDefaultValueNumber = int(DscDefaultValue.strip(), 0)
+ except:
+ DscDefaultValueNumber = int(DscDefaultValue.lstrip('0'))
DscMatch = (DscDefaultValueNumber == PcdValueNumber)
else:
if DecDefaultValue is None:
@@ -1152,7 +1158,10 @@ class PcdReport(object):
for ModulePath in ModuleOverride:
ModuleDefault = ModuleOverride[ModulePath]
if Pcd.DatumType in TAB_PCD_NUMERIC_TYPES:
- ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
+ try:
+ ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
+ except:
+ ModulePcdDefaultValueNumber = int(ModuleDefault.lstrip('0'))
Match = (ModulePcdDefaultValueNumber == PcdValueNumber)
if Pcd.DatumType == 'BOOLEAN':
ModuleDefault = str(ModulePcdDefaultValueNumber)
@@ -1231,7 +1240,10 @@ class PcdReport(object):
if Value.startswith(('0x', '0X')):
Value = '{} ({:d})'.format(Value, int(Value, 0))
else:
- Value = "0x{:X} ({})".format(int(Value, 0), Value)
+ try:
+ Value = "0x{:X} ({})".format(int(Value, 0), Value)
+ except:
+ Value = "0x{:X} ({})".format(int(Value.lstrip('0')), Value)
FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', Value))
if IsStructure:
self.PrintStructureInfo(File, Pcd.DefaultValues)