mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-12 01:42:21 +08:00
Switch coverage analysis to IGNORE_TESTS for its allowlist
No intended behavior change. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
5ef96c6809
commit
7960b7661a
@ -164,12 +164,14 @@ class Task:
|
|||||||
class CoverageTask(Task):
|
class CoverageTask(Task):
|
||||||
"""Analyze test coverage."""
|
"""Analyze test coverage."""
|
||||||
|
|
||||||
ALLOW_LIST = [
|
IGNORED_TESTS = {
|
||||||
# Algorithm not supported yet
|
'test_suite_psa_crypto_metadata': [
|
||||||
'test_suite_psa_crypto_metadata;Asymmetric signature: pure EdDSA',
|
# Algorithm not supported yet
|
||||||
# Algorithm not supported yet
|
'Asymmetric signature: pure EdDSA',
|
||||||
'test_suite_psa_crypto_metadata;Cipher: XTS',
|
# Algorithm not supported yet
|
||||||
]
|
'Cipher: XTS',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, options) -> None:
|
def __init__(self, options) -> None:
|
||||||
super().__init__(options)
|
super().__init__(options)
|
||||||
@ -197,13 +199,15 @@ class CoverageTask(Task):
|
|||||||
hit = any(suite_case in comp_outcomes.successes or
|
hit = any(suite_case in comp_outcomes.successes or
|
||||||
suite_case in comp_outcomes.failures
|
suite_case in comp_outcomes.failures
|
||||||
for comp_outcomes in outcomes.values())
|
for comp_outcomes in outcomes.values())
|
||||||
|
(test_suite, test_description) = suite_case.split(';')
|
||||||
|
ignored = self.is_test_case_ignored(test_suite, test_description)
|
||||||
|
|
||||||
if not hit and suite_case not in self.ALLOW_LIST:
|
if not hit and not ignored:
|
||||||
if self.full_coverage:
|
if self.full_coverage:
|
||||||
results.error('Test case not executed: {}', suite_case)
|
results.error('Test case not executed: {}', suite_case)
|
||||||
else:
|
else:
|
||||||
results.warning('Test case not executed: {}', suite_case)
|
results.warning('Test case not executed: {}', suite_case)
|
||||||
elif hit and suite_case in self.ALLOW_LIST:
|
elif hit and ignored:
|
||||||
# Test Case should be removed from the allow list.
|
# Test Case should be removed from the allow list.
|
||||||
if self.full_coverage:
|
if self.full_coverage:
|
||||||
results.error('Allow listed test case was executed: {}', suite_case)
|
results.error('Allow listed test case was executed: {}', suite_case)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user