Exemplo n.º 1
0
    def BuildDatabase(self, SpeciDirs=None):
        # Clean report table
        EccGlobalData.gDb.TblReport.Drop()
        EccGlobalData.gDb.TblReport.Create()

        # Build database
        if self.IsInit:
            if self.ScanMetaData:
                EdkLogger.quiet("Building database for Meta Data File ...")
                self.BuildMetaDataFileDatabase(SpeciDirs)
            if self.ScanSourceCode:
                EdkLogger.quiet("Building database for Meta Data File Done!")
                if SpeciDirs == None:
                    c.CollectSourceCodeDataIntoDB(EccGlobalData.gTarget)
                else:
                    for specificDir in SpeciDirs:
                        c.CollectSourceCodeDataIntoDB(
                            os.path.join(EccGlobalData.gTarget, specificDir))

        EccGlobalData.gIdentifierTableList = GetTableList(
            (MODEL_FILE_C, MODEL_FILE_H), 'Identifier', EccGlobalData.gDb)
        EccGlobalData.gCFileList = GetFileList(MODEL_FILE_C, EccGlobalData.gDb)
        EccGlobalData.gHFileList = GetFileList(MODEL_FILE_H, EccGlobalData.gDb)
        EccGlobalData.gUFileList = GetFileList(MODEL_FILE_UNI,
                                               EccGlobalData.gDb)
Exemplo n.º 2
0
    def BuildDatabase(self):
        # Clean report table
        EccGlobalData.gDb.TblReport.Drop()
        EccGlobalData.gDb.TblReport.Create()

        # Build database
        if self.IsInit:
            if self.ScanSourceCode:
                EdkLogger.quiet("Building database for source code ...")
                c.CollectSourceCodeDataIntoDB(EccGlobalData.gTarget)
            if self.ScanMetaData:
                EdkLogger.quiet("Building database for source code done!")
                self.BuildMetaDataFileDatabase()

        EccGlobalData.gIdentifierTableList = GetTableList(
            (MODEL_FILE_C, MODEL_FILE_H), 'Identifier', EccGlobalData.gDb)