Skip to content

Commit

Permalink
Enable collect_test_cases.py to work for TF-PSA-Crypto
Browse files Browse the repository at this point in the history
This commit adapts collect_test_cases.py to work for Mbed TLS and
TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <[email protected]>
  • Loading branch information
Harry-Ramsey committed Jan 17, 2025
1 parent 40f125f commit 049270e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/mbedtls_framework/collect_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ def collect_from_script(self, script_name):
@staticmethod
def collect_test_directories():
"""Get the relative path for the TLS and Crypto test directories."""
mbedtls_root = build_tree.guess_mbedtls_root()
directories = [os.path.join(mbedtls_root, 'tests'),
os.path.join(mbedtls_root, 'tf-psa-crypto', 'tests')]
project_root = build_tree.guess_project_root()
if build_tree.looks_like_mbedtls_root(project_root) and not build_tree.is_mbedtls_3_6():
directories = [os.path.join(project_root, 'tests'),
os.path.join(project_root, 'tf-psa-crypto', 'tests')]
else:
directories = [os.path.join(project_root, 'tests')]

directories = [os.path.relpath(p) for p in directories]
return directories

Expand Down

0 comments on commit 049270e

Please sign in to comment.