]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.pytool/EccCheck: Check ecc_csv exists
authorPierre Gondois <Pierre.Gondois@arm.com>
Tue, 6 Jul 2021 20:55:40 +0000 (04:55 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 12 Jul 2021 14:53:55 +0000 (14:53 +0000)
'workspace_path' being an absolute path leads to 'ecc_csv' being
an absolute path. Then it won't be found among 'file' as they
are relative paths.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
.pytool/Plugin/EccCheck/EccCheck.py

index fff317f2311099fc7cae8ed34350ef52fb8000f2..87f0e65a140f5722384157655f5e3b2c1a2f5f22 100644 (file)
@@ -206,11 +206,10 @@ class EccCheck(ICiBuildPlugin):
 \r
     def ParseEccReport(self, ecc_diff_range: Dict[str, List[Tuple[int, int]]], workspace_path: str) -> None:\r
         ecc_log = os.path.join(workspace_path, "Ecc.log")\r
-        ecc_csv = "Ecc.csv"\r
-        file = os.listdir(workspace_path)\r
+        ecc_csv = os.path.join(workspace_path, "Ecc.csv")\r
         row_lines = []\r
         ignore_error_code = self.GetIgnoreErrorCode()\r
-        if ecc_csv in file:\r
+        if os.path.exists(ecc_csv):\r
             with open(ecc_csv) as csv_file:\r
                 reader = csv.reader(csv_file)\r
                 for row in reader:\r