1. Remove the ECC.db from .\Database, the file is move to the root directory of Ecc...
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 20 Mar 2008 05:53:39 +0000 (05:53 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 20 Mar 2008 05:53:39 +0000 (05:53 +0000)
2. Fix a Ecc Tool Error number issue
3. Enable a new error report format for file error.

git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1082 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Ecc/Database/Ecc.db [deleted file]
Source/Python/Ecc/EccToolError.py
Source/Python/Table/TableReport.py

diff --git a/Source/Python/Ecc/Database/Ecc.db b/Source/Python/Ecc/Database/Ecc.db
deleted file mode 100644 (file)
index 4655c17..0000000
Binary files a/Source/Python/Ecc/Database/Ecc.db and /dev/null differ
index c79e41d..c68dc83 100644 (file)
@@ -29,7 +29,7 @@ ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE = 3003
 \r
 ERROR_HEADER_CHECK_ALL = 4000\r
 ERROR_HEADER_CHECK_FILE = 4001\r
-ERROR_HEADER_CHECK_FUNCTION = 4001\r
+ERROR_HEADER_CHECK_FUNCTION = 4002\r
 \r
 ERROR_C_FUNCTION_LAYOUT_CHECK_ALL = 5000\r
 ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE = 5001\r
index ab49694..042c1b7 100644 (file)
@@ -15,7 +15,7 @@
 # Import Modules\r
 #\r
 import Common.EdkLogger as EdkLogger\r
-import os\r
+import os, time\r
 from Table import Table\r
 from Common.String import ConvertToSqlString2\r
 import EccToolError as EccToolError\r
@@ -103,14 +103,21 @@ class TableReport(Table):
                 BelongsToTable = Record[3]\r
                 BelongsToItem = Record[4]\r
                 IsCorrected = Record[5]\r
-                SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B\r
-                                where A.ID = %s and B.ID = A.BelongsToFile\r
+                SqlCommand = ''\r
+                if BelongsToTable == 'File':\r
+                    SqlCommand = """select 0, FullPath from %s where ID = %s\r
                              """ % (BelongsToTable, BelongsToItem)\r
+                else:\r
+                    SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B\r
+                                    where A.ID = %s and B.ID = A.BelongsToFile\r
+                                 """ % (BelongsToTable, BelongsToItem)\r
                 NewRecord = self.Exec(SqlCommand)\r
                 if NewRecord != []:\r
-                    File.write("""%s,%s,%s,%s,%s,"%s"\n""" % (Index, ErrorID, EccToolError.gEccErrorMessage[ErrorID], NewRecord[0][1], NewRecord[0][0], OtherMsg))\r
+                    File.write("""%s,%s,"%s",%s,%s,"%s"\n""" % (Index, ErrorID, EccToolError.gEccErrorMessage[ErrorID], NewRecord[0][1], NewRecord[0][0], OtherMsg))\r
             \r
             File.close()\r
         except IOError:\r
-            EdkLogger.error("ECC", EdkLogger.ECC_ERROR, "The report file %s is locked by other progress, access permission denied!" % Filename)\r
+            NewFilename = 'Report_' + time.strftime("%Y%m%d_%H%M%S.csv", time.localtime())\r
+            EdkLogger.warn("ECC", "The report file %s is locked by other progress, use %s instead!" % (Filename, NewFilename))\r
+            self.ToCSV(NewFilename)\r
 \r