Lines Matching refs:root
13 """Whether the given directory looks like the root of the PSA Crypto source tree."""
18 """Whether the given directory looks like the root of the Mbed TLS source tree."""
25 def crypto_core_directory(root: Optional[str] = None, relative: Optional[bool] = False) -> str:
33 if root is None:
34 root = guess_project_root()
35 if looks_like_tf_psa_crypto_root(root):
38 return os.path.join(root, "core")
39 elif looks_like_mbedtls_root(root):
42 return os.path.join(root, "library")
46 def crypto_library_filename(root: Optional[str] = None) -> str:
48 if root is None:
49 root = guess_project_root()
50 if looks_like_tf_psa_crypto_root(root):
52 elif looks_like_mbedtls_root(root):
58 """Check that the current working directory is the project root, and throw
62 raise Exception("This script must be run from Mbed TLS root")
65 """Detect the root of the Mbed TLS source tree and change to it.
81 Return the first possible project root directory.
96 def guess_mbedtls_root(root: Optional[str] = None) -> str:
99 Return the first possible Mbed TLS root directory.
102 if root is None:
103 root = guess_project_root()
104 if looks_like_mbedtls_root(root):
105 return root
109 def guess_tf_psa_crypto_root(root: Optional[str] = None) -> str:
112 Return the first possible TF-PSA-Crypto root directory.
115 if root is None:
116 root = guess_project_root()
117 if looks_like_tf_psa_crypto_root(root):
118 return root