Enable libpsa in psa-api-tests
Refactor psa-api-test deployments to use libpsa.
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: If7f8fdbd48ce082a810983bf0696c791db185a9c
diff --git a/deployments/psa-api-test/psa-api-test.cmake b/deployments/psa-api-test/psa-api-test.cmake
index 739ed26..ba2a74e 100644
--- a/deployments/psa-api-test/psa-api-test.cmake
+++ b/deployments/psa-api-test/psa-api-test.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -11,45 +11,31 @@
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
-# Use libts for locating and accessing services. An appropriate version of
-# libts will be imported for the environment in which service tests are
-# deployed.
-#-------------------------------------------------------------------------------
-include(${TS_ROOT}/deployments/libts/libts-import.cmake)
-target_link_libraries(${PROJECT_NAME} PRIVATE libts::ts)
-
-#-------------------------------------------------------------------------------
# Components that are common across all deployments
#
#-------------------------------------------------------------------------------
-add_components(
- TARGET "${PROJECT_NAME}"
- BASE_DIR ${TS_ROOT}
- COMPONENTS
- "components/common/tlv"
- "components/service/common/client"
- "components/service/common/include"
-)
target_sources(${PROJECT_NAME} PRIVATE
${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c
)
#-------------------------------------------------------------------------------
+# Use libpsa for locating PSA services. An appropriate version of
+# libpsa will be imported for the environment. Making sure the link order is
+# correct.
+#-------------------------------------------------------------------------------
+include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake)
+target_link_libraries( ${PROJECT_NAME} PRIVATE libpsa::psa)
+
+target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
+
+#-------------------------------------------------------------------------------
# Export project header paths for arch tests
#
#-------------------------------------------------------------------------------
get_target_property(_include_paths ${PROJECT_NAME} INCLUDE_DIRECTORIES)
list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
-
-#-------------------------------------------------------------------------------
-# Components used from external projects
-#
-#-------------------------------------------------------------------------------
-
-# psa-arch-tests
include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
-target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
#-------------------------------------------------------------------------------
# Define install content.