public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Feng, Bob C" <bob.c.feng@intel.com>
To: edk2-devel@lists.01.org
Cc: Bob Feng <bob.c.feng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [Patch 1/3] BaseTools: Fixed a build report issue.
Date: Mon,  4 Feb 2019 14:48:00 +0800	[thread overview]
Message-ID: <20190204064802.14616-1-bob.c.feng@intel.com> (raw)

Generate report fail when -Y EXECUTION_ORDER in build command.
This patch is going to fix this issue.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Source/Python/Eot/EotMain.py       | 3 ++-
 BaseTools/Source/Python/build/BuildReport.py | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/BaseTools/Source/Python/Eot/EotMain.py b/BaseTools/Source/Python/Eot/EotMain.py
index fd4bee6f90..57f96c89c9 100644
--- a/BaseTools/Source/Python/Eot/EotMain.py
+++ b/BaseTools/Source/Python/Eot/EotMain.py
@@ -19,11 +19,12 @@ import Common.LongFilePathOs as os, time, glob
 import Common.EdkLogger as EdkLogger
 import Eot.EotGlobalData as EotGlobalData
 from optparse import OptionParser
 from Common.StringUtils import NormPath
 from Common import BuildToolError
-from Common.Misc import GuidStructureStringToGuidString, sdict
+from Common.Misc import GuidStructureStringToGuidString
+from collections import OrderedDict as sdict
 from Eot.Parser import *
 from Eot.InfParserLite import EdkInfParser
 from Common.StringUtils import GetSplitValueList
 from Eot import c
 from Eot import Database
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index e457660fce..52764a6c55 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1650,18 +1650,18 @@ class PredictionReport(object):
         #
         SourceList = os.path.join(self._EotDir, "SourceFile.txt")
         GuidList = os.path.join(self._EotDir, "GuidList.txt")
         DispatchList = os.path.join(self._EotDir, "Dispatch.txt")
 
-        TempFile = open(SourceList, "w+")
+        TempFile = []
         for Item in self._SourceList:
             FileWrite(TempFile, Item)
-        TempFile.close()
-        TempFile = open(GuidList, "w+")
+        SaveFileOnChange(SourceList, "".join(TempFile), False)
+        TempFile = []
         for Key in self._GuidMap:
             FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key]))
-        TempFile.close()
+        SaveFileOnChange(GuidList, "".join(TempFile), False)
 
         try:
             from Eot.EotMain import Eot
 
             #
-- 
2.18.0.windows.1



             reply	other threads:[~2019-02-04  6:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  6:48 Feng, Bob C [this message]
2019-02-04  6:48 ` [Patch 2/3] BaseTools: Fixed an issue about StructurePcd Feng, Bob C
2019-02-14 14:31   ` Gao, Liming
2019-02-04  6:48 ` [Patch 3/3] BaseTools: Fix a bug about PcdArray Feng, Bob C
2019-02-14 14:32   ` Gao, Liming
     [not found] ` <08650203BA1BD64D8AD9B6D5D74A85D1600859D1@SHSMSX101.ccr.corp.intel.com>
2019-02-14 14:01   ` [Patch 1/3] BaseTools: Fixed a build report issue Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204064802.14616-1-bob.c.feng@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox