mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-25 00:02:42 +00:00
Introduce function to return library/core directory
Add crypto_core_directory in build_tree.py so that the libary/core directory can be returned based on what repository we are in. Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
parent
5556f908cb
commit
13ecb691a3
@ -21,6 +21,14 @@ def looks_like_mbedtls_root(path: str) -> bool:
|
|||||||
def looks_like_root(path: str) -> bool:
|
def looks_like_root(path: str) -> bool:
|
||||||
return looks_like_tf_psa_crypto_root(path) or looks_like_mbedtls_root(path)
|
return looks_like_tf_psa_crypto_root(path) or looks_like_mbedtls_root(path)
|
||||||
|
|
||||||
|
def crypto_core_directory() -> str:
|
||||||
|
if looks_like_tf_psa_crypto_root(os.path.curdir):
|
||||||
|
return "core"
|
||||||
|
elif looks_like_mbedtls_root(os.path.curdir):
|
||||||
|
return "library"
|
||||||
|
else:
|
||||||
|
raise Exception('Neither Mbed TLS nor TF-PSA-Crypto source tree found')
|
||||||
|
|
||||||
def check_repo_path():
|
def check_repo_path():
|
||||||
"""
|
"""
|
||||||
Check that the current working directory is the project root, and throw
|
Check that the current working directory is the project root, and throw
|
||||||
|
Loading…
x
Reference in New Issue
Block a user