CI: Fix coverage analysis

Add mps2/an385 and unit_testing to the simulator
criteria while parsing testsuites. Now the testsuit
will count as a simulator only where the platform
is quemu*, native*, unit_testing, mps2/an385.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
This commit is contained in:
Arkadiusz Cholewinski 2024-04-25 13:39:36 +02:00 committed by Alberto Escolar
parent ef258166ba
commit a1cdf27610

View file

@ -13,6 +13,13 @@ class Json_report:
"components":[]
}
simulators = [
'unit_testing',
'native',
'quemu',
'mps2/an385'
]
report_json = {}
def __init__(self):
@ -80,7 +87,7 @@ class Json_report:
test_case = {
"name":testcase_name
}
if 'qemu' in testsuite['platform'] or 'native' in testsuite['platform']:
if any(platform in testsuite['platform'] for platform in self.simulators):
if test_suite['status'] == "":
test_suite['status'] = 'sim_only'
@ -122,7 +129,7 @@ class Json_report:
test_case = {
"name": testcase_name
}
if 'qemu' in testsuite['platform'] or 'native' in testsuite['platform']:
if any(platform in testsuite['platform'] for platform in self.simulators):
if test_suite['status'] == "":
test_suite['status'] = 'sim_only'
@ -159,7 +166,7 @@ class Json_report:
test_case = {
"name": testcase_name
}
if 'qemu' in testsuite['platform'] or 'native' in testsuite['platform']:
if any(platform in testsuite['platform'] for platform in self.simulators):
if test_suite['status'] == "":
test_suite['status'] = 'sim_only'
@ -175,7 +182,7 @@ class Json_report:
test_suite['platforms'].append(testsuite['platform'])
sub_component["test_suites"].append(test_suite)
else:
if 'qemu' in testsuite['platform'] or 'native' in testsuite['platform']:
if any(platform in testsuite['platform'] for platform in self.simulators):
if test_suite['status'] == "":
test_suite['status'] = 'sim_only'