]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/BuildReport.py
BaseTools: Fixed an error reported during generating report
[mirror_edk2.git] / BaseTools / Source / Python / build / BuildReport.py
index 945ee1b573e406ad9960946d7e331ed3ac836546..bf5bb8fa177a98e6ed20b3d56722c758637581bd 100644 (file)
@@ -4,7 +4,7 @@
 # This module contains the functionality to generate build report after\r
 # build all target completes successfully.\r
 #\r
-# Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,7 +16,7 @@
 \r
 ## Import Modules\r
 #\r
-import os\r
+import Common.LongFilePathOs as os\r
 import re\r
 import platform\r
 import textwrap\r
@@ -40,6 +40,8 @@ from Common.DataType import TAB_SPACE_SPLIT
 from Common.DataType import TAB_BRG_PCD\r
 from Common.DataType import TAB_BRG_LIBRARY\r
 from Common.DataType import TAB_BACK_SLASH\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
 \r
 ## Pattern to extract contents in EDK DXS files\r
 gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)\r
@@ -1234,9 +1236,10 @@ class FdRegionReport(object):
                     DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue\r
                     PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue\r
         #\r
-        # Collect PCDs defined in DSC common section\r
+        # Collect PCDs defined in DSC file\r
         #\r
-        for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:\r
+        for arch in Wa.ArchList:\r
+            Platform = Wa.BuildDatabase[Wa.MetaFile, arch]\r
             for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:\r
                 DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue\r
                 PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue\r
@@ -1254,7 +1257,7 @@ class FdRegionReport(object):
         for Pa in Wa.AutoGenObjectList:\r
             for ModuleKey in Pa.Platform.Modules:\r
                 M = Pa.Platform.Modules[ModuleKey].M\r
-                InfPath = os.path.join(Wa.WorkspaceDir, M.MetaFile.File)\r
+                InfPath = mws.join(Wa.WorkspaceDir, M.MetaFile.File)\r
                 self._GuidsDb[M.Guid.upper()] = "%s (%s)" % (M.Module.BaseName, InfPath)\r
 \r
         #\r
@@ -1276,7 +1279,7 @@ class FdRegionReport(object):
                             Guid = GuidStructureByteArrayToGuidString(GuidValue).upper()\r
                     for Section in Ffs.SectionList:\r
                         try:\r
-                            ModuleSectFile = os.path.join(Wa.WorkspaceDir, Section.SectFileName)\r
+                            ModuleSectFile = mws.join(Wa.WorkspaceDir, Section.SectFileName)\r
                             self._GuidsDb[Guid] = ModuleSectFile\r
                         except AttributeError:\r
                             pass\r