mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
a3251d8446
commit
09ae0f1113
|
@ -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,6 +2100,7 @@ def Main():
|
|||
else:
|
||||
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration)
|
||||
if MyBuild != None:
|
||||
if not BuildError:
|
||||
MyBuild.BuildReport.GenerateReport(BuildDurationStr)
|
||||
MyBuild.Db.Close()
|
||||
EdkLogger.SetLevel(EdkLogger.QUIET)
|
||||
|
|
Loading…
Reference in New Issue