SecNum + \\r
'.tmp'\r
TempFile = os.path.normpath(TempFile)\r
+ #\r
+ # Remove temp file if its time stamp is older than dummy file\r
+ # Just in case the external tool fails at this time but succeeded before\r
+ # Error should be reported if the external tool does not generate a new output based on new input\r
+ #\r
+ if os.path.exists(TempFile) and os.path.exists(DummyFile) and os.path.getmtime(TempFile) < os.path.getmtime(DummyFile):\r
+ os.remove(TempFile)\r
\r
FirstCall = False\r
CmdOption = '-e'\r
FirstCall = False\r
ReturnValue[0] = 0\r
GenFdsGlobalVariable.GuidTool(TempFile, [DummyFile], ExternalTool, CmdOption)\r
+ #\r
+ # There is external tool which does not follow standard rule which return nonzero if tool fails\r
+ # The output file has to be checked\r
+ #\r
+ if not os.path.exists(TempFile):\r
+ EdkLogger.error("GenFds", COMMAND_FAILURE, 'Fail to call %s, no output file was generated' % ExternalTool)\r
\r
FileHandleIn = open(DummyFile,'rb')\r
FileHandleIn.seek(0,2)\r
\r
ToolDefinition = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.ConfDir).ToolsDefTxtDictionary\r
ToolPathTmp = None\r
+ ToolOption = None\r
for ToolDef in ToolDefinition.items():\r
if self.NameGuid == ToolDef[1]:\r
KeyList = ToolDef[0].split('_')\r