mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 21:39:54 +00:00
Introduce guess_tf_psa_crypto_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
parent
d1f2934e78
commit
db80b2301c
@ -98,3 +98,16 @@ def guess_mbedtls_root(root: Optional[str] = None) -> str:
|
||||
return root
|
||||
else:
|
||||
raise Exception('Mbed TLS source tree not found')
|
||||
|
||||
def guess_tf_psa_crypto_root(root: Optional[str] = None) -> str:
|
||||
"""Guess TF-PSA-Crypto source code directory.
|
||||
|
||||
Return the first possible TF-PSA-Crypto root directory.
|
||||
Raise an exception if we are not in TF-PSA-Crypto.
|
||||
"""
|
||||
if root is None:
|
||||
root = guess_project_root()
|
||||
if looks_like_tf_psa_crypto_root(root):
|
||||
return root
|
||||
else:
|
||||
raise Exception('TF-PSA-Crypto source tree not found')
|
||||
|
Loading…
x
Reference in New Issue
Block a user