summaryrefslogtreecommitdiff
path: root/.pytool/Plugin/EccCheck
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2021-07-07 04:55:40 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-07-12 14:53:55 +0000
commit50672d269266e84e37bee925ad61da166bd22944 (patch)
treeb13cd8c1092921dc7469e4edb6e1ff5901a72e42 /.pytool/Plugin/EccCheck
parenta050c599df8b0a47e404d0a61c7d93e33388bb9e (diff)
downloadedk2-50672d269266e84e37bee925ad61da166bd22944.zip
edk2-50672d269266e84e37bee925ad61da166bd22944.tar.gz
edk2-50672d269266e84e37bee925ad61da166bd22944.tar.bz2
.pytool/EccCheck: Check ecc_csv exists
'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>
Diffstat (limited to '.pytool/Plugin/EccCheck')
-rw-r--r--.pytool/Plugin/EccCheck/EccCheck.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py
index fff317f..87f0e65 100644
--- a/.pytool/Plugin/EccCheck/EccCheck.py
+++ b/.pytool/Plugin/EccCheck/EccCheck.py
@@ -206,11 +206,10 @@ class EccCheck(ICiBuildPlugin):
def ParseEccReport(self, ecc_diff_range: Dict[str, List[Tuple[int, int]]], workspace_path: str) -> None:
ecc_log = os.path.join(workspace_path, "Ecc.log")
- ecc_csv = "Ecc.csv"
- file = os.listdir(workspace_path)
+ ecc_csv = os.path.join(workspace_path, "Ecc.csv")
row_lines = []
ignore_error_code = self.GetIgnoreErrorCode()
- if ecc_csv in file:
+ if os.path.exists(ecc_csv):
with open(ecc_csv) as csv_file:
reader = csv.reader(csv_file)
for row in reader: