(self)
| 43 | # |
| 44 | class Ecc(object): |
| 45 | def __init__(self): |
| 46 | # Version and Copyright |
| 47 | self.VersionNumber = ("1.0" + " Build " + gBUILD_VERSION) |
| 48 | self.Version = "%prog Version " + self.VersionNumber |
| 49 | self.Copyright = "Copyright (c) 2009 - 2018, Intel Corporation All rights reserved." |
| 50 | |
| 51 | self.InitDefaultConfigIni() |
| 52 | self.OutputFile = 'output.txt' |
| 53 | self.ReportFile = 'Report.csv' |
| 54 | self.ExceptionFile = 'exception.xml' |
| 55 | self.IsInit = True |
| 56 | self.ScanSourceCode = True |
| 57 | self.ScanMetaData = True |
| 58 | self.MetaFile = '' |
| 59 | self.OnlyScan = None |
| 60 | |
| 61 | # Parse the options and args |
| 62 | self.ParseOption() |
| 63 | EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n") |
| 64 | |
| 65 | WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"])) |
| 66 | os.environ["WORKSPACE"] = WorkspaceDir |
| 67 | |
| 68 | # set multiple workspace |
| 69 | PackagesPath = os.getenv("PACKAGES_PATH") |
| 70 | mws.setWs(WorkspaceDir, PackagesPath) |
| 71 | |
| 72 | GlobalData.gWorkspace = WorkspaceDir |
| 73 | |
| 74 | GlobalData.gGlobalDefines["WORKSPACE"] = WorkspaceDir |
| 75 | |
| 76 | EdkLogger.info("Loading ECC configuration ... done") |
| 77 | # Generate checkpoints list |
| 78 | EccGlobalData.gConfig = Configuration(self.ConfigFile) |
| 79 | |
| 80 | # Generate exception list |
| 81 | EccGlobalData.gException = ExceptionCheck(self.ExceptionFile) |
| 82 | |
| 83 | # Init Ecc database |
| 84 | EccGlobalData.gDb = Database.Database(Database.DATABASE_PATH) |
| 85 | EccGlobalData.gDb.InitDatabase(self.IsInit) |
| 86 | |
| 87 | # |
| 88 | # Get files real name in workspace dir |
| 89 | # |
| 90 | GlobalData.gAllFiles = DirCache(GlobalData.gWorkspace) |
| 91 | |
| 92 | # Build ECC database |
| 93 | # self.BuildDatabase() |
| 94 | self.DetectOnlyScanDirs() |
| 95 | |
| 96 | # Start to check |
| 97 | self.Check() |
| 98 | |
| 99 | # Show report |
| 100 | self.GenReport() |
| 101 | |
| 102 | # Close Database |
nothing calls this directly
no test coverage detected