Defer the data collection for build report to make the build duration time more accurate.
authorqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Sun, 21 Feb 2010 10:42:23 +0000 (10:42 +0000)
committerqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Sun, 21 Feb 2010 10:42:23 +0000 (10:42 +0000)
git-svn-id: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/trunk/BaseTools@1880 c2973edb-eda0-4c78-bc6a-9341b269661f

Source/Python/build/BuildReport.py

index adbc81e..48413bb 100755 (executable)
@@ -1394,7 +1394,7 @@ class BuildReport(object):
     #
     def AddPlatformReport(self, Wa):
         if self.ReportFile:
-            self.ReportList.append(PlatformReport(Wa, self.ReportType))
+            self.ReportList.append(Wa)
 
     ##
     # Generates the final report.
@@ -1412,8 +1412,8 @@ class BuildReport(object):
             except IOError:
                 EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
             try:
-                for Report in self.ReportList:
-                    Report.GenerateReport(File, BuildDuration, self.ReportType)
+                for Wa in self.ReportList:
+                    PlatformReport(Wa, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
                 EdkLogger.info("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
             except IOError:
                 EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)