Fix: psa-api-test executable names clash
All psa-api-test executables used the same name which resulted in
executables being overwritten when installing to the same location.
As a result, b-test was not running all tests.
This commit changes the CMake project name for psa-arch-test
deployments, and the uses the PROJECT_NAME variable to create and
configure the built executable.
Change-Id: Idd80baf1cf7a9b16ad27b0d94abdb71c3179b169
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt b/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
index 40384d6..e97830e 100644
--- a/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
+++ b/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
@@ -14,9 +14,9 @@
# Used for building and running psa arch tests on an Arm based Linux device
#-------------------------------------------------------------------------------
include(${TS_ROOT}/environments/arm-linux/env.cmake)
-project(trusted-services LANGUAGES CXX C)
-add_executable(psa-api-test)
-target_include_directories(psa-api-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+project(psa-crypto-api-test LANGUAGES CXX C)
+add_executable(${PROJECT_NAME})
+target_include_directories(${PROJECT_NAME} PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
#-------------------------------------------------------------------------------
# Extend with components that are common across all deployments of
diff --git a/deployments/psa-api-test/crypto/crypto-api-test.cmake b/deployments/psa-api-test/crypto/crypto-api-test.cmake
index 558d057..9cc97e3 100644
--- a/deployments/psa-api-test/crypto/crypto-api-test.cmake
+++ b/deployments/psa-api-test/crypto/crypto-api-test.cmake
@@ -30,14 +30,14 @@
#
#-------------------------------------------------------------------------------
add_components(
- TARGET "psa-api-test"
+ TARGET "${PROJECT_NAME}"
BASE_DIR ${TS_ROOT}
COMPONENTS
"components/service/crypto/include"
"components/service/crypto/client/psa"
)
-target_sources(psa-api-test PRIVATE
+target_sources(${PROJECT_NAME} PRIVATE
${TS_ROOT}/deployments/psa-api-test/crypto/crypto_locator.c
)
diff --git a/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt b/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
index 884fc3e..e2dd311 100644
--- a/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
+++ b/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
@@ -13,12 +13,12 @@
# linux-pc
#
# Used for building and running psa arch crypto tests in a native PC enviroment.
-# Tests can be run by running the built executable called "psa-api-test"
+# Tests can be run by running the built executable called "psa-crypto-api-test"
#-------------------------------------------------------------------------------
include(${TS_ROOT}/environments/linux-pc/env.cmake)
-project(trusted-services LANGUAGES CXX C)
-add_executable(psa-api-test)
-target_include_directories(psa-api-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+project(psa-crypto-api-test LANGUAGES CXX C)
+add_executable(${PROJECT_NAME})
+target_include_directories(${PROJECT_NAME} PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
#-------------------------------------------------------------------------------
# Extend with components that are common across all deployments of