]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Ecc.py
Sync EDKII BaseTools to BaseTools project r1903.
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Ecc.py
index ea9d0b343c955080add93ce9789e9c4d25acc26e..4b5c319c35e14d432594ae4b97272e9ec5670e9b 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the main entrance of ECC tool\r
 #\r
-# Copyright (c) 2009, Intel Corporation\r
+# Copyright (c) 2009 - 2010, Intel Corporation\r
 # All rights reserved. This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -43,7 +43,7 @@ class Ecc(object):
         # Version and Copyright\r
         self.VersionNumber = "0.01"\r
         self.Version = "%prog Version " + self.VersionNumber\r
-        self.Copyright = "Copyright (c) 2009, Intel Corporation  All rights reserved."\r
+        self.Copyright = "Copyright (c) 2009 - 2010, Intel Corporation  All rights reserved."\r
 \r
         self.InitDefaultConfigIni()\r
         self.OutputFile = 'output.txt'\r
@@ -225,6 +225,9 @@ class Ecc(object):
         EdkLogger.quiet("Loading ECC configuration ... done")\r
         (Options, Target) = self.EccOptionParser()\r
 \r
+        if Options.Workspace:\r
+            os.environ["WORKSPACE"] = Options.Workspace\r
+            \r
         # Check workspace envirnoment\r
         if "WORKSPACE" not in os.environ:\r
             EdkLogger.error("ECC", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",\r
@@ -244,6 +247,8 @@ class Ecc(object):
             self.OutputFile = Options.OutputFile\r
         if Options.ReportFile != None:\r
             self.ReportFile = Options.ReportFile\r
+        if Options.ExceptionFile != None:\r
+            self.ExceptionFile = Options.ExceptionFile\r
         if Options.Target != None:\r
             if not os.path.isdir(Options.Target):\r
                 EdkLogger.error("ECC", BuildToolError.OPTION_VALUE_INVALID, ExtraData="Target [%s] does NOT exist" % Options.Target)\r
@@ -294,6 +299,8 @@ class Ecc(object):
             help="Specify the name of an output file, if and only if one filename was specified.")\r
         Parser.add_option("-r", "--reportfile filename", action="store", type="string", dest="ReportFile",\r
             help="Specify the name of an report file, if and only if one filename was specified.")\r
+        Parser.add_option("-e", "--exceptionfile filename", action="store", type="string", dest="ExceptionFile",\r
+            help="Specify the name of an exception file, if and only if one filename was specified.")\r
         Parser.add_option("-m", "--metadata", action="store_true", type=None, help="Only scan meta-data files information if this option is specified.")\r
         Parser.add_option("-s", "--sourcecode", action="store_true", type=None, help="Only scan source code files information if this option is specified.")\r
         Parser.add_option("-k", "--keepdatabase", action="store_true", type=None, help="The existing Ecc database will not be cleaned except report information if this option is specified.")\r
@@ -307,6 +314,7 @@ class Ecc(object):
                                                                                    "including library instances selected, final dependency expression, "\\r
                                                                                    "and warning messages, etc.")\r
         Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")\r
+        Parser.add_option("-w", "--workspace", action="store", type="string", dest='Workspace', help="Specify workspace.")\r
 \r
         (Opt, Args)=Parser.parse_args()\r
 \r