summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-06-08 10:14:02 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-06-24 23:02:26 +0800
commitc2d0a1f6d22f0c743899d9d98cef41e4a46c5921 (patch)
tree497825cc8ba0f2299f22155bd4b7206c6b71afe7 /BaseTools
parent778aad47e8eed49cecb7e1bd7650d878d9ea50e3 (diff)
downloadedk2-c2d0a1f6d22f0c743899d9d98cef41e4a46c5921.tar.gz
edk2-c2d0a1f6d22f0c743899d9d98cef41e4a46c5921.tar.bz2
edk2-c2d0a1f6d22f0c743899d9d98cef41e4a46c5921.zip
BaseTools: Enhance the report to not show the empty section
Enhance the report to not show the empty section, eg: Module Library Sub-section, if there is nothing in this section, we will not show it in the report. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 91d1e93d49..d700d6f810 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -318,9 +318,9 @@ class LibraryReport(object):
# @param File The file object for report
#
def GenerateReport(self, File):
- FileWrite(File, gSubSectionStart)
- FileWrite(File, TAB_BRG_LIBRARY)
if len(self.LibraryList) > 0:
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, TAB_BRG_LIBRARY)
FileWrite(File, gSubSectionSep)
for LibraryItem in self.LibraryList:
LibInfPath = LibraryItem[0]
@@ -347,7 +347,7 @@ class LibraryReport(object):
else:
FileWrite(File, "{%s}" % LibClass)
- FileWrite(File, gSubSectionEnd)
+ FileWrite(File, gSubSectionEnd)
##
# Reports dependency expression information
@@ -411,9 +411,6 @@ class DepexReport(object):
#
def GenerateReport(self, File, GlobalDepexParser):
if not self.Depex:
- FileWrite(File, gSubSectionStart)
- FileWrite(File, TAB_DEPEX)
- FileWrite(File, gSubSectionEnd)
return
FileWrite(File, gSubSectionStart)
if os.path.isfile(self._DepexFileName):
@@ -866,7 +863,7 @@ class PcdReport(object):
FileWrite(File, " *M - Module scoped PCD override")
FileWrite(File, gSectionSep)
else:
- if not ReportSubType:
+ if not ReportSubType and ModulePcdSet:
#
# For module PCD sub-section
#
@@ -1011,7 +1008,7 @@ class PcdReport(object):
if ModulePcdSet == None:
FileWrite(File, gSectionEnd)
else:
- if not ReportSubType:
+ if not ReportSubType and ModulePcdSet:
FileWrite(File, gSubSectionEnd)