(self)
| 167 | |
| 168 | # Check UNI files |
| 169 | def UniCheck(self): |
| 170 | if EccGlobalData.gConfig.GeneralCheckUni == '1' or EccGlobalData.gConfig.GeneralCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': |
| 171 | EdkLogger.quiet("Checking whether UNI file is UTF-16 ...") |
| 172 | SqlCommand = """select ID, FullPath, ExtName from File where ExtName like 'uni'""" |
| 173 | RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand) |
| 174 | for Record in RecordSet: |
| 175 | File = Record[1] |
| 176 | FileIn = open(File, 'rb').read(2) |
| 177 | if FileIn != '\xff\xfe': |
| 178 | OtherMsg = "File %s is not a valid UTF-16 UNI file" % Record[1] |
| 179 | EccGlobalData.gDb.TblReport.Insert(ERROR_GENERAL_CHECK_UNI, OtherMsg=OtherMsg, BelongsToTable='File', BelongsToItem=Record[0]) |
| 180 | |
| 181 | # General Checking |
| 182 | def GeneralCheck(self): |
no test coverage detected