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

hack_dependencies_not_implemented: more verbose indication

Indicate which dependencies are not implemented. This makes it feasible to
audit the not-implemented detection.

The generated test cases that are detected as never-executed now have one or
more `DEPENDENCY_NOT_IMPLEMENTED_YET_PSA_WANT_xxx` instead of a single
`DEPENDENCY_NOT_IMPLEMENTED`. This does not affect when the test cases run.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-04-10 16:36:13 +02:00
parent c3f5c96a8d
commit c6fe12a155
3 changed files with 144 additions and 144 deletions

View File

@ -69,10 +69,10 @@ def hack_dependencies_not_implemented(dependencies: List[str]) -> None:
if _implemented_dependencies is None:
_implemented_dependencies = \
read_implemented_dependencies('include/psa/crypto_config.h')
if not all((dep.lstrip('!') in _implemented_dependencies or
not dep.lstrip('!').startswith('PSA_WANT'))
for dep in dependencies):
dependencies.append('DEPENDENCY_NOT_IMPLEMENTED_YET')
for dep in dependencies:
dep = dep.lstrip('!')
if dep.startswith('PSA_WANT') and dep not in _implemented_dependencies:
dependencies.append('DEPENDENCY_NOT_IMPLEMENTED_YET_' + dep)
class Information:
"""Gather information about PSA constructors."""