From 5cfb4bd3f57530d8e00e945b51b45327036482e5 Mon Sep 17 00:00:00 2001 From: Arkadiusz Cholewinski Date: Mon, 20 May 2024 17:06:50 +0200 Subject: [PATCH] CI: Fix Coverage Analysis The coverage_analysis.py while generating report, duplicates files and functions of components. Signed-off-by: Arkadiusz Cholewinski --- scripts/ci/coverage/coverage_analysis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ci/coverage/coverage_analysis.py b/scripts/ci/coverage/coverage_analysis.py index 1d446aded78..8238a5134e2 100644 --- a/scripts/ci/coverage/coverage_analysis.py +++ b/scripts/ci/coverage/coverage_analysis.py @@ -274,7 +274,9 @@ class Json_report: "Name":i_fun['name'] } json_file['Uncovered_Functions'].append(json_uncovered_funciton) - json_files.append(json_file) + comp_exists = [x for x in json_files if x['Path'] == json_file['Path']] + if not comp_exists: + json_files.append(json_file) json_component['files']=json_files output_json['components'].append(json_component) else: