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/psa-api-test.cmake b/deployments/psa-api-test/psa-api-test.cmake
index ecb3a9c..d58620f 100644
--- a/deployments/psa-api-test/psa-api-test.cmake
+++ b/deployments/psa-api-test/psa-api-test.cmake
@@ -16,14 +16,14 @@
# deployed.
#-------------------------------------------------------------------------------
include(${TS_ROOT}/deployments/libts/libts-import.cmake)
-target_link_libraries(psa-api-test PRIVATE libts)
+target_link_libraries(${PROJECT_NAME} PRIVATE libts)
#-------------------------------------------------------------------------------
# Components that are common accross all deployments
#
#-------------------------------------------------------------------------------
add_components(
- TARGET "psa-api-test"
+ TARGET "${PROJECT_NAME}"
BASE_DIR ${TS_ROOT}
COMPONENTS
"components/common/tlv"
@@ -34,7 +34,7 @@
"components/rpc/common/logging"
)
-target_sources(psa-api-test PRIVATE
+target_sources(${PROJECT_NAME} PRIVATE
${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c
)
@@ -42,7 +42,7 @@
# Export project header paths for arch tests
#
#-------------------------------------------------------------------------------
-get_target_property(_include_paths psa-api-test INCLUDE_DIRECTORIES)
+get_target_property(_include_paths ${PROJECT_NAME} INCLUDE_DIRECTORIES)
list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
#-------------------------------------------------------------------------------
@@ -52,7 +52,7 @@
# psa-arch-tests
include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
-target_link_libraries(psa-api-test PRIVATE val_nspe test_combine pal_nspe)
+target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
#-------------------------------------------------------------------------------
# Define install content.
@@ -61,4 +61,4 @@
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
endif()
-install(TARGETS psa-api-test RUNTIME DESTINATION ${TS_ENV}/bin)
+install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${TS_ENV}/bin)