Skip to content

Commit 1ead596

Browse files
Merge pull request #118 from Harry-Ramsey/independent-collect-test-cases
Enable collect_test_cases.py to work for TF-PSA-Crypto
2 parents 40f125f + 049270e commit 1ead596

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/mbedtls_framework/collect_test_cases.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ def collect_from_script(self, script_name):
126126
@staticmethod
127127
def collect_test_directories():
128128
"""Get the relative path for the TLS and Crypto test directories."""
129-
mbedtls_root = build_tree.guess_mbedtls_root()
130-
directories = [os.path.join(mbedtls_root, 'tests'),
131-
os.path.join(mbedtls_root, 'tf-psa-crypto', 'tests')]
129+
project_root = build_tree.guess_project_root()
130+
if build_tree.looks_like_mbedtls_root(project_root) and not build_tree.is_mbedtls_3_6():
131+
directories = [os.path.join(project_root, 'tests'),
132+
os.path.join(project_root, 'tf-psa-crypto', 'tests')]
133+
else:
134+
directories = [os.path.join(project_root, 'tests')]
135+
132136
directories = [os.path.relpath(p) for p in directories]
133137
return directories
134138

0 commit comments

Comments
 (0)