1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

PSA test case generation: comment out always-skipped test cases

When we generate a test case for a mechanism that is not implemented,
comment out the test case rather than giving it a never-fulfilled
dependency. That way we don't create test cases that cannot be executed.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-04-11 11:19:24 +02:00
parent 696b7eef7b
commit b8ddf6acd4
6 changed files with 25783 additions and 19885 deletions

View File

@ -128,13 +128,13 @@ class TestCase(test_case.TestCase):
def detect_not_implemented_dependencies(self) -> None:
"""Detect dependencies that are not implemented."""
all_implemented_dependencies = self.read_implemented_dependencies()
not_implemented = set()
for dep in self.dependencies:
if (dep.startswith('PSA_WANT') and
dep not in all_implemented_dependencies):
not_implemented.add('DEPENDENCY_NOT_IMPLEMENTED_YET_' + dep)
self.dependencies = sorted(not_implemented) + self.dependencies
self.dependencies.sort()
not_implemented = [dep
for dep in self.dependencies
if (dep.startswith('PSA_WANT') and
dep not in all_implemented_dependencies)]
if not_implemented:
self.skip_because('not implemented: ' +
' '.join(not_implemented))
def __init__(self) -> None:
super().__init__()