diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-23 06:49:25 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-23 06:49:25 +0000 |
commit | 09ae0f111332895581084907d14353fe546a5b3a (patch) | |
tree | 67ffd685b3138ba119a8ebfe8d8ca8cd0745177e /BaseTools/Source/Python/build | |
parent | a3251d844695f90711bfe094f12755fd01742369 (diff) | |
download | edk2-platforms-09ae0f111332895581084907d14353fe546a5b3a.tar.xz |
BaseTools: Build report should not be generated if build failed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17679 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 9b48ac094b..33b45ba267 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1965,6 +1965,7 @@ def Main(): EdkLogger.quiet(time.strftime("Build start time: %H:%M:%S, %b.%d %Y\n", time.localtime()));
ReturnCode = 0
MyBuild = None
+ BuildError = True
try:
if len(Target) == 0:
Target = "all"
@@ -2035,6 +2036,10 @@ def Main(): SqlCommand = """drop table IF EXISTS %s""" % TmpTableName
TmpTableDict[TmpTableName].execute(SqlCommand)
#MyBuild.DumpBuildData()
+ #
+ # All job done, no error found and no exception raised
+ #
+ BuildError = False
except FatalError, X:
if MyBuild != None:
# for multi-thread build exits safely
@@ -2095,7 +2100,8 @@ def Main(): else:
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration)
if MyBuild != None:
- MyBuild.BuildReport.GenerateReport(BuildDurationStr)
+ if not BuildError:
+ MyBuild.BuildReport.GenerateReport(BuildDurationStr)
MyBuild.Db.Close()
EdkLogger.SetLevel(EdkLogger.QUIET)
EdkLogger.quiet("\n- %s -" % Conclusion)
|