Correctly detect presence of the built library
Use the repo-specific test not just the Mbed TLS specific one.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/tests/scripts/test_psa_compliance.py b/tests/scripts/test_psa_compliance.py
index 46d4763..ea171cb 100755
--- a/tests/scripts/test_psa_compliance.py
+++ b/tests/scripts/test_psa_compliance.py
@@ -60,7 +60,13 @@
in_psa_crypto_repo = build_tree.looks_like_psa_crypto_root(mbedtls_dir)
- if not os.path.exists(library_build_dir + '/library/libmbedcrypto.a'):
+ if in_psa_crypto_repo:
+ crypto_lib_filename = \
+ library_build_dir + '/core/libpsacrypto.a'
+ else:
+ crypto_lib_filename = library_build_dir + '/library/libmbedcrypto.a'
+
+ if not os.path.exists(crypto_lib_filename):
subprocess.check_call([
'cmake', '.',
'-GUnix Makefiles',
@@ -86,12 +92,6 @@
os.mkdir(build_dir)
os.chdir(build_dir)
- if in_psa_crypto_repo:
- crypto_lib_filename = \
- library_build_dir + '/core/libpsacrypto.a'
- else:
- crypto_lib_filename = library_build_dir + '/library/libmbedcrypto.a'
-
extra_includes = (';{}/drivers/builtin/include'.format(mbedtls_dir)
if in_psa_crypto_repo else '')