|
From: <xf...@us...> - 2012-03-14 01:11:57
|
Revision: 2502
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2502&view=rev
Author: xfzyr
Date: 2012-03-14 01:11:51 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Fix a issue of -Y arguments in report is not in consistent style if they are null.
Signed-off-by: yzeng15
Reviewed-by: lgao4
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2012-03-14 00:53:03 UTC (rev 2501)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2012-03-14 01:11:51 UTC (rev 2502)
@@ -34,6 +34,9 @@
from Common.BuildToolError import FILE_WRITE_FAILURE
from Common.BuildToolError import CODE_ERROR
from Common.DataType import TAB_LINE_BREAK
+from Common.DataType import TAB_INF_PCD
+from Common.DataType import EDK_COMPONENT_TYPE_LIBRARY
+from Common.DataType import TAB_DEPEX
## Pattern to extract contents in EDK DXS files
gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
@@ -76,6 +79,7 @@
gSubSectionEnd = "<" + "-" * (gLineMaxLength-2) + ">"
gSubSectionSep = "-" * gLineMaxLength
+
## The look up table to map PCD type to pair of report display type and DEC type
gPcdTypeMap = {
'FixedAtBuild' : ('FIXED', 'FixedAtBuild'),
@@ -178,7 +182,7 @@
# @param MaxLength The Max Length of the line
#
def FileLinesSplit(Content=None, MaxLength=None):
- ContentList = Content.split(TAB_LINE_BREAK)
+ ContentList = Content.split(os.linesep)
NewContent = ''
NewContentList = []
for Line in ContentList:
@@ -290,7 +294,7 @@
#
def GenerateReport(self, File):
FileWrite(File, gSubSectionStart)
- FileWrite(File, "Library")
+ FileWrite(File, EDK_COMPONENT_TYPE_LIBRARY)
if len(self.LibraryList) > 0:
FileWrite(File, gSubSectionSep)
for LibraryItem in self.LibraryList:
@@ -382,8 +386,10 @@
#
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):
try:
@@ -712,7 +718,7 @@
# For module PCD sub-section
#
FileWrite(File, gSubSectionStart)
- FileWrite(File, "PCD")
+ FileWrite(File, TAB_INF_PCD)
FileWrite(File, gSubSectionSep)
for Key in self.AllPcds:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|