2009-07-17 11:10:31 +02:00
## @file
# This file is used to be the main entrance of ECC tool
#
2018-07-05 11:40:04 +02:00
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
2019-04-04 01:03:11 +02:00
# SPDX-License-Identifier: BSD-2-Clause-Patent
2009-07-17 11:10:31 +02:00
#
##
# Import Modules
#
2018-07-13 12:18:42 +02:00
from __future__ import absolute_import
2014-08-15 05:06:48 +02:00
import Common . LongFilePathOs as os , time , glob , sys
2009-07-17 11:10:31 +02:00
import Common . EdkLogger as EdkLogger
2018-08-08 05:18:06 +02:00
from Ecc import Database
from Ecc import EccGlobalData
from Ecc . MetaDataParser import *
2009-07-17 11:10:31 +02:00
from optparse import OptionParser
2018-08-08 05:18:06 +02:00
from Ecc . Configuration import Configuration
from Ecc . Check import Check
2011-12-16 09:52:13 +01:00
import Common . GlobalData as GlobalData
2011-12-07 07:19:28 +01:00
2018-05-19 12:50:25 +02:00
from Common . StringUtils import NormPath
2011-09-18 14:17:25 +02:00
from Common . BuildVersion import gBUILD_VERSION
2009-07-17 11:10:31 +02:00
from Common import BuildToolError
2011-12-16 09:52:13 +01:00
from Common . Misc import PathClass
2012-04-10 09:18:20 +02:00
from Common . Misc import DirCache
2018-08-08 05:18:06 +02:00
from Ecc . MetaFileWorkspace . MetaFileParser import DscParser
from Ecc . MetaFileWorkspace . MetaFileParser import DecParser
from Ecc . MetaFileWorkspace . MetaFileParser import InfParser
from Ecc . MetaFileWorkspace . MetaFileParser import Fdf
from Ecc . MetaFileWorkspace . MetaFileTable import MetaFileStorage
from Ecc import c
2009-09-11 05:14:43 +02:00
import re , string
2018-08-08 05:18:06 +02:00
from Ecc . Exception import *
2014-08-15 05:06:48 +02:00
from Common . LongFilePathSupport import OpenLongFilePath as open
2015-10-08 11:28:51 +02:00
from Common . MultipleWorkspace import MultipleWorkspace as mws
2009-07-17 11:10:31 +02:00
## Ecc
#
# This class is used to define Ecc main entrance
#
# @param object: Inherited from object class
#
class Ecc ( object ) :
def __init__ ( self ) :
# Version and Copyright
2016-03-09 02:42:06 +01:00
self . VersionNumber = ( " 1.0 " + " Build " + gBUILD_VERSION )
2009-07-17 11:10:31 +02:00
self . Version = " % prog Version " + self . VersionNumber
2018-07-05 11:40:04 +02:00
self . Copyright = " Copyright (c) 2009 - 2018, Intel Corporation All rights reserved. "
2009-07-17 11:10:31 +02:00
self . InitDefaultConfigIni ( )
self . OutputFile = ' output.txt '
self . ReportFile = ' Report.csv '
self . ExceptionFile = ' exception.xml '
self . IsInit = True
self . ScanSourceCode = True
self . ScanMetaData = True
2011-12-07 07:19:28 +01:00
self . MetaFile = ' '
2014-07-01 09:10:10 +02:00
self . OnlyScan = None
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Parse the options and args
self . ParseOption ( )
2016-03-09 02:42:06 +01:00
EdkLogger . info ( time . strftime ( " % H: % M: % S, % b. %d % Y " , time . localtime ( ) ) + " [00:00] " + " \n " )
2018-07-05 11:40:04 +02:00
2011-12-16 09:52:13 +01:00
WorkspaceDir = os . path . normcase ( os . path . normpath ( os . environ [ " WORKSPACE " ] ) )
os . environ [ " WORKSPACE " ] = WorkspaceDir
2018-07-05 11:40:04 +02:00
2015-10-08 11:28:51 +02:00
# set multiple workspace
PackagesPath = os . getenv ( " PACKAGES_PATH " )
mws . setWs ( WorkspaceDir , PackagesPath )
2018-07-05 11:40:04 +02:00
2011-12-16 09:52:13 +01:00
GlobalData . gWorkspace = WorkspaceDir
GlobalData . gGlobalDefines [ " WORKSPACE " ] = WorkspaceDir
2018-07-05 11:40:04 +02:00
2016-03-09 02:42:06 +01:00
EdkLogger . info ( " Loading ECC configuration ... done " )
2009-07-17 11:10:31 +02:00
# Generate checkpoints list
EccGlobalData . gConfig = Configuration ( self . ConfigFile )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Generate exception list
EccGlobalData . gException = ExceptionCheck ( self . ExceptionFile )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Init Ecc database
EccGlobalData . gDb = Database . Database ( Database . DATABASE_PATH )
EccGlobalData . gDb . InitDatabase ( self . IsInit )
2009-09-11 05:14:43 +02:00
2012-04-10 09:18:20 +02:00
#
# Get files real name in workspace dir
#
GlobalData . gAllFiles = DirCache ( GlobalData . gWorkspace )
2018-07-05 11:40:04 +02:00
2009-07-17 11:10:31 +02:00
# Build ECC database
2014-07-01 09:10:10 +02:00
# self.BuildDatabase()
self . DetectOnlyScanDirs ( )
2018-07-05 11:40:04 +02:00
2009-07-17 11:10:31 +02:00
# Start to check
self . Check ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Show report
self . GenReport ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Close Database
EccGlobalData . gDb . Close ( )
def InitDefaultConfigIni ( self ) :
paths = map ( lambda p : os . path . join ( p , ' Ecc ' , ' config.ini ' ) , sys . path )
paths = ( os . path . realpath ( ' config.ini ' ) , ) + tuple ( paths )
for path in paths :
if os . path . exists ( path ) :
self . ConfigFile = path
return
self . ConfigFile = ' config.ini '
2014-07-01 09:10:10 +02:00
## DetectOnlyScan
#
# Detect whether only scanned folders have been enabled
#
def DetectOnlyScanDirs ( self ) :
if self . OnlyScan == True :
OnlyScanDirs = [ ]
# Use regex here if multiple spaces or TAB exists in ScanOnlyDirList in config.ini file
for folder in re . finditer ( r ' \ S+ ' , EccGlobalData . gConfig . ScanOnlyDirList ) :
OnlyScanDirs . append ( folder . group ( ) )
if len ( OnlyScanDirs ) != 0 :
self . BuildDatabase ( OnlyScanDirs )
else :
EdkLogger . error ( " ECC " , BuildToolError . OPTION_VALUE_INVALID , ExtraData = " Use -f option need to fill specific folders in config.ini file " )
else :
self . BuildDatabase ( )
2018-07-05 11:40:04 +02:00
2009-07-17 11:10:31 +02:00
## BuildDatabase
#
# Build the database for target
#
2014-07-01 09:10:10 +02:00
def BuildDatabase ( self , SpeciDirs = None ) :
2009-07-17 11:10:31 +02:00
# Clean report table
EccGlobalData . gDb . TblReport . Drop ( )
EccGlobalData . gDb . TblReport . Create ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Build database
2018-07-05 11:40:04 +02:00
if self . IsInit :
2009-07-17 11:10:31 +02:00
if self . ScanMetaData :
2012-04-10 09:18:20 +02:00
EdkLogger . quiet ( " Building database for Meta Data File ... " )
2014-07-01 09:10:10 +02:00
self . BuildMetaDataFileDatabase ( SpeciDirs )
2012-04-10 09:18:20 +02:00
if self . ScanSourceCode :
EdkLogger . quiet ( " Building database for Meta Data File Done! " )
2018-03-26 22:25:43 +02:00
if SpeciDirs is None :
2014-07-01 09:10:10 +02:00
c . CollectSourceCodeDataIntoDB ( EccGlobalData . gTarget )
else :
for specificDir in SpeciDirs :
c . CollectSourceCodeDataIntoDB ( os . path . join ( EccGlobalData . gTarget , specificDir ) )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
EccGlobalData . gIdentifierTableList = GetTableList ( ( MODEL_FILE_C , MODEL_FILE_H ) , ' Identifier ' , EccGlobalData . gDb )
2010-09-06 03:58:00 +02:00
EccGlobalData . gCFileList = GetFileList ( MODEL_FILE_C , EccGlobalData . gDb )
EccGlobalData . gHFileList = GetFileList ( MODEL_FILE_H , EccGlobalData . gDb )
2014-08-25 03:16:34 +02:00
EccGlobalData . gUFileList = GetFileList ( MODEL_FILE_UNI , EccGlobalData . gDb )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
## BuildMetaDataFileDatabase
#
# Build the database for meta data files
#
2014-07-01 09:10:10 +02:00
def BuildMetaDataFileDatabase ( self , SpecificDirs = None ) :
ScanFolders = [ ]
2018-03-26 22:25:43 +02:00
if SpecificDirs is None :
2014-07-01 09:10:10 +02:00
ScanFolders . append ( EccGlobalData . gTarget )
else :
2018-07-05 11:40:04 +02:00
for specificDir in SpecificDirs :
2014-07-01 09:10:10 +02:00
ScanFolders . append ( os . path . join ( EccGlobalData . gTarget , specificDir ) )
2009-07-17 11:10:31 +02:00
EdkLogger . quiet ( " Building database for meta data files ... " )
Op = open ( EccGlobalData . gConfig . MetaDataFileCheckPathOfGenerateFileList , ' w+ ' )
#SkipDirs = Read from config file
SkipDirs = EccGlobalData . gConfig . SkipDirList
2019-01-04 10:35:10 +01:00
SkipDirString = ' | ' . join ( SkipDirs )
2014-07-01 09:10:10 +02:00
# p = re.compile(r'.*[\\/](?:%s)[\\/]?.*' % SkipDirString)
p = re . compile ( r ' .*[ \\ /](?: %s ^ \ S)[ \\ /]?.* ' % SkipDirString )
for scanFolder in ScanFolders :
for Root , Dirs , Files in os . walk ( scanFolder ) :
if p . match ( Root . upper ( ) ) :
2009-07-17 11:10:31 +02:00
continue
2014-07-01 09:10:10 +02:00
for Dir in Dirs :
Dirname = os . path . join ( Root , Dir )
if os . path . islink ( Dirname ) :
Dirname = os . path . realpath ( Dirname )
if os . path . isdir ( Dirname ) :
# symlinks to directories are treated as directories
Dirs . remove ( Dir )
Dirs . append ( Dirname )
2018-07-05 11:40:04 +02:00
2014-07-01 09:10:10 +02:00
for File in Files :
if len ( File ) > 4 and File [ - 4 : ] . upper ( ) == " .DEC " :
Filename = os . path . normpath ( os . path . join ( Root , File ) )
EdkLogger . quiet ( " Parsing %s " % Filename )
Op . write ( " %s \r " % Filename )
#Dec(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb)
self . MetaFile = DecParser ( Filename , MODEL_FILE_DEC , EccGlobalData . gDb . TblDec )
self . MetaFile . Start ( )
continue
if len ( File ) > 4 and File [ - 4 : ] . upper ( ) == " .DSC " :
Filename = os . path . normpath ( os . path . join ( Root , File ) )
EdkLogger . quiet ( " Parsing %s " % Filename )
Op . write ( " %s \r " % Filename )
#Dsc(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb)
self . MetaFile = DscParser ( PathClass ( Filename , Root ) , MODEL_FILE_DSC , MetaFileStorage ( EccGlobalData . gDb . TblDsc . Cur , Filename , MODEL_FILE_DSC , True ) )
2019-02-06 08:44:39 +01:00
# always do post-process, in case of macros change
2014-07-01 09:10:10 +02:00
self . MetaFile . DoPostProcess ( )
self . MetaFile . Start ( )
self . MetaFile . _PostProcess ( )
continue
if len ( File ) > 4 and File [ - 4 : ] . upper ( ) == " .INF " :
Filename = os . path . normpath ( os . path . join ( Root , File ) )
EdkLogger . quiet ( " Parsing %s " % Filename )
Op . write ( " %s \r " % Filename )
#Inf(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb)
self . MetaFile = InfParser ( Filename , MODEL_FILE_INF , EccGlobalData . gDb . TblInf )
self . MetaFile . Start ( )
continue
if len ( File ) > 4 and File [ - 4 : ] . upper ( ) == " .FDF " :
Filename = os . path . normpath ( os . path . join ( Root , File ) )
EdkLogger . quiet ( " Parsing %s " % Filename )
Op . write ( " %s \r " % Filename )
Fdf ( Filename , True , EccGlobalData . gWorkspace , EccGlobalData . gDb )
continue
2014-08-25 03:16:34 +02:00
if len ( File ) > 4 and File [ - 4 : ] . upper ( ) == " .UNI " :
Filename = os . path . normpath ( os . path . join ( Root , File ) )
EdkLogger . quiet ( " Parsing %s " % Filename )
Op . write ( " %s \r " % Filename )
2015-06-25 09:50:55 +02:00
FileID = EccGlobalData . gDb . TblFile . InsertFile ( Filename , MODEL_FILE_UNI )
EccGlobalData . gDb . TblReport . UpdateBelongsToItemByFile ( FileID , File )
2014-08-25 03:16:34 +02:00
continue
2009-07-17 11:10:31 +02:00
Op . close ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Commit to database
EccGlobalData . gDb . Conn . commit ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
EdkLogger . quiet ( " Building database for meta data files done! " )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
##
#
# Check each checkpoint
#
def Check ( self ) :
EdkLogger . quiet ( " Checking ... " )
EccCheck = Check ( )
EccCheck . Check ( )
EdkLogger . quiet ( " Checking done! " )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
##
#
# Generate the scan report
#
def GenReport ( self ) :
EdkLogger . quiet ( " Generating report ... " )
EccGlobalData . gDb . TblReport . ToCSV ( self . ReportFile )
EdkLogger . quiet ( " Generating report done! " )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
def GetRealPathCase ( self , path ) :
TmpPath = path . rstrip ( os . sep )
PathParts = TmpPath . split ( os . sep )
if len ( PathParts ) == 0 :
return path
if len ( PathParts ) == 1 :
if PathParts [ 0 ] . strip ( ) . endswith ( ' : ' ) :
return PathParts [ 0 ] . upper ( )
# Relative dir, list . current dir
Dirs = os . listdir ( ' . ' )
for Dir in Dirs :
if Dir . upper ( ) == PathParts [ 0 ] . upper ( ) :
return Dir
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
if PathParts [ 0 ] . strip ( ) . endswith ( ' : ' ) :
PathParts [ 0 ] = PathParts [ 0 ] . upper ( )
ParentDir = PathParts [ 0 ]
RealPath = ParentDir
if PathParts [ 0 ] == ' ' :
RealPath = os . sep
ParentDir = os . sep
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
PathParts . remove ( PathParts [ 0 ] ) # need to remove the parent
for Part in PathParts :
Dirs = os . listdir ( ParentDir + os . sep )
for Dir in Dirs :
if Dir . upper ( ) == Part . upper ( ) :
RealPath + = os . sep
RealPath + = Dir
break
ParentDir + = os . sep
ParentDir + = Dir
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
return RealPath
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
## ParseOption
#
# Parse options
#
def ParseOption ( self ) :
( Options , Target ) = self . EccOptionParser ( )
2009-09-11 05:14:43 +02:00
2010-03-01 00:39:39 +01:00
if Options . Workspace :
os . environ [ " WORKSPACE " ] = Options . Workspace
2010-09-06 03:58:00 +02:00
2019-02-06 08:44:39 +01:00
# Check workspace environment
2009-07-17 11:10:31 +02:00
if " WORKSPACE " not in os . environ :
2009-09-11 05:14:43 +02:00
EdkLogger . error ( " ECC " , BuildToolError . ATTRIBUTE_NOT_AVAILABLE , " Environment variable not found " ,
2009-07-17 11:10:31 +02:00
ExtraData = " WORKSPACE " )
else :
EccGlobalData . gWorkspace = os . path . normpath ( os . getenv ( " WORKSPACE " ) )
if not os . path . exists ( EccGlobalData . gWorkspace ) :
EdkLogger . error ( " ECC " , BuildToolError . FILE_NOT_FOUND , ExtraData = " WORKSPACE = %s " % EccGlobalData . gWorkspace )
os . environ [ " WORKSPACE " ] = EccGlobalData . gWorkspace
# Set log level
self . SetLogLevel ( Options )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
# Set other options
2018-03-26 22:25:43 +02:00
if Options . ConfigFile is not None :
2009-07-17 11:10:31 +02:00
self . ConfigFile = Options . ConfigFile
2018-03-26 22:25:43 +02:00
if Options . OutputFile is not None :
2009-07-17 11:10:31 +02:00
self . OutputFile = Options . OutputFile
2018-03-26 22:25:43 +02:00
if Options . ReportFile is not None :
2009-07-17 11:10:31 +02:00
self . ReportFile = Options . ReportFile
2018-03-26 22:25:43 +02:00
if Options . ExceptionFile is not None :
2010-03-01 00:39:39 +01:00
self . ExceptionFile = Options . ExceptionFile
2018-03-26 22:25:43 +02:00
if Options . Target is not None :
2009-07-17 11:10:31 +02:00
if not os . path . isdir ( Options . Target ) :
EdkLogger . error ( " ECC " , BuildToolError . OPTION_VALUE_INVALID , ExtraData = " Target [ %s ] does NOT exist " % Options . Target )
else :
EccGlobalData . gTarget = self . GetRealPathCase ( os . path . normpath ( Options . Target ) )
else :
EdkLogger . warn ( " Ecc " , EdkLogger . ECC_ERROR , " The target source tree was not specified, using current WORKSPACE instead! " )
EccGlobalData . gTarget = os . path . normpath ( os . getenv ( " WORKSPACE " ) )
2018-03-26 22:25:43 +02:00
if Options . keepdatabase is not None :
2009-07-17 11:10:31 +02:00
self . IsInit = False
2018-03-26 22:25:43 +02:00
if Options . metadata is not None and Options . sourcecode is not None :
2009-07-17 11:10:31 +02:00
EdkLogger . error ( " ECC " , BuildToolError . OPTION_CONFLICT , ExtraData = " -m and -s can ' t be specified at one time " )
2018-03-26 22:25:43 +02:00
if Options . metadata is not None :
2009-07-17 11:10:31 +02:00
self . ScanSourceCode = False
2018-03-26 22:25:43 +02:00
if Options . sourcecode is not None :
2009-07-17 11:10:31 +02:00
self . ScanMetaData = False
2018-03-26 22:25:43 +02:00
if Options . folders is not None :
2014-07-01 09:10:10 +02:00
self . OnlyScan = True
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
## SetLogLevel
#
# Set current log level of the tool based on args
#
2009-09-11 05:14:43 +02:00
# @param Option: The option list including log level setting
2009-07-17 11:10:31 +02:00
#
def SetLogLevel ( self , Option ) :
2018-03-26 22:25:43 +02:00
if Option . verbose is not None :
2009-07-17 11:10:31 +02:00
EdkLogger . SetLevel ( EdkLogger . VERBOSE )
2018-03-26 22:25:43 +02:00
elif Option . quiet is not None :
2009-07-17 11:10:31 +02:00
EdkLogger . SetLevel ( EdkLogger . QUIET )
2018-03-26 22:25:43 +02:00
elif Option . debug is not None :
2009-07-17 11:10:31 +02:00
EdkLogger . SetLevel ( Option . debug + 1 )
else :
EdkLogger . SetLevel ( EdkLogger . INFO )
## Parse command line options
#
# Using standard Python module optparse to parse command line option of this tool.
#
# @retval Opt A optparse.Values object containing the parsed options
# @retval Args Target of build command
#
def EccOptionParser ( self ) :
Parser = OptionParser ( description = self . Copyright , version = self . Version , prog = " Ecc.exe " , usage = " % prog [options] " )
Parser . add_option ( " -t " , " --target sourcepath " , action = " store " , type = " string " , dest = ' Target ' ,
help = " Check all files under the target workspace. " )
Parser . add_option ( " -c " , " --config filename " , action = " store " , type = " string " , dest = " ConfigFile " ,
help = " Specify a configuration file. Defaultly use config.ini under ECC tool directory. " )
Parser . add_option ( " -o " , " --outfile filename " , action = " store " , type = " string " , dest = " OutputFile " ,
help = " Specify the name of an output file, if and only if one filename was specified. " )
Parser . add_option ( " -r " , " --reportfile filename " , action = " store " , type = " string " , dest = " ReportFile " ,
help = " Specify the name of an report file, if and only if one filename was specified. " )
2010-03-01 00:39:39 +01:00
Parser . add_option ( " -e " , " --exceptionfile filename " , action = " store " , type = " string " , dest = " ExceptionFile " ,
help = " Specify the name of an exception file, if and only if one filename was specified. " )
2009-07-17 11:10:31 +02:00
Parser . add_option ( " -m " , " --metadata " , action = " store_true " , type = None , help = " Only scan meta-data files information if this option is specified. " )
Parser . add_option ( " -s " , " --sourcecode " , action = " store_true " , type = None , help = " Only scan source code files information if this option is specified. " )
Parser . add_option ( " -k " , " --keepdatabase " , action = " store_true " , type = None , help = " The existing Ecc database will not be cleaned except report information if this option is specified. " )
2009-09-11 05:14:43 +02:00
Parser . add_option ( " -l " , " --log filename " , action = " store " , dest = " LogFile " , help = """ If specified, the tool should emit the changes that
were made by the tool after printing the result message .
If filename , the emit to the file , otherwise emit to
standard output . If no modifications were made , then do not
2009-07-17 11:10:31 +02:00
create a log file , or output a log message . """ )
Parser . add_option ( " -q " , " --quiet " , action = " store_true " , type = None , help = " Disable all messages except FATAL ERRORS. " )
Parser . add_option ( " -v " , " --verbose " , action = " store_true " , type = None , help = " Turn on verbose output with informational messages printed, " \
" including library instances selected, final dependency expression, " \
" and warning messages, etc. " )
Parser . add_option ( " -d " , " --debug " , action = " store " , type = " int " , help = " Enable debug messages at specified level. " )
2010-03-01 00:39:39 +01:00
Parser . add_option ( " -w " , " --workspace " , action = " store " , type = " string " , dest = ' Workspace ' , help = " Specify workspace. " )
2014-07-01 09:10:10 +02:00
Parser . add_option ( " -f " , " --folders " , action = " store_true " , type = None , help = " Only scanning specified folders which are recorded in config.ini file. " )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
( Opt , Args ) = Parser . parse_args ( )
2009-09-11 05:14:43 +02:00
2009-07-17 11:10:31 +02:00
return ( Opt , Args )
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another
# script.
#
if __name__ == ' __main__ ' :
# Initialize log system
EdkLogger . Initialize ( )
EdkLogger . IsRaiseError = False
StartTime = time . clock ( )
Ecc = Ecc ( )
FinishTime = time . clock ( )
BuildDuration = time . strftime ( " % M: % S " , time . gmtime ( int ( round ( FinishTime - StartTime ) ) ) )
EdkLogger . quiet ( " \n %s [ %s ] " % ( time . strftime ( " % H: % M: % S, % b. %d % Y " , time . localtime ( ) ) , BuildDuration ) )