Build: add rot to cmake partition target names

change from tfm_partition_x to tfm_app_rot_partition_x or
tfm_psa_rot_partition_x. This allows the linker to automtically pick up
the library files and determine where they should be placed.

Change-Id: I6e928625b0cd11b522352624890512a97dfaae76
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/test/suites/attestation/CMakeLists.txt b/test/suites/attestation/CMakeLists.txt
index 60912d7..8c1076d 100644
--- a/test/suites/attestation/CMakeLists.txt
+++ b/test/suites/attestation/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -90,7 +90,7 @@
             tfm_test_framework_s
             tfm_attestation_defs
             tfm_boot_status
-            $<$<NOT:$<BOOL:${FORWARD_PROT_MSG}>>:tfm_partition_crypto>
+            $<$<NOT:$<BOOL:${FORWARD_PROT_MSG}>>:tfm_psa_rot_partition_crypto>
             platform_s
     )
 
diff --git a/test/suites/audit/CMakeLists.txt b/test/suites/audit/CMakeLists.txt
index 82ebc7b..91c5581 100644
--- a/test/suites/audit/CMakeLists.txt
+++ b/test/suites/audit/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -63,7 +63,7 @@
     target_link_libraries(tfm_test_suite_audit_s
         PRIVATE
             tfm_test_framework_s
-            tfm_partition_audit
+            tfm_psa_rot_partition_audit
     )
 
     target_link_libraries(tfm_s_tests
diff --git a/test/suites/core/CMakeLists.txt b/test/suites/core/CMakeLists.txt
index fc76498..f275e09 100644
--- a/test/suites/core/CMakeLists.txt
+++ b/test/suites/core/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -38,7 +38,7 @@
         CMSIS_5_tfm_ns
         tfm_partition_defs
         platform_ns
-        tfm_partition_core_test_defs
+        tfm_psa_rot_partition_core_test_defs
 )
 
 
diff --git a/test/suites/crypto/CMakeLists.txt b/test/suites/crypto/CMakeLists.txt
index 5568c47..c45f7fb 100644
--- a/test/suites/crypto/CMakeLists.txt
+++ b/test/suites/crypto/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -66,7 +66,7 @@
         PRIVATE
             tfm_secure_api
             tfm_test_framework_s
-            tfm_partition_secure_client_2
+            tfm_app_rot_partition_secure_client_2
             platform_s
     )
 
diff --git a/test/suites/its/CMakeLists.txt b/test/suites/its/CMakeLists.txt
index f8d43b7..0b8df3e 100644
--- a/test/suites/its/CMakeLists.txt
+++ b/test/suites/its/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -69,7 +69,7 @@
             tfm_secure_api
             tfm_test_framework_s
             platform_region_defs
-            tfm_partition_secure_client_2
+            tfm_app_rot_partition_secure_client_2
             platform_s
     )
 
diff --git a/test/suites/ps/CMakeLists.txt b/test/suites/ps/CMakeLists.txt
index af2d9eb..e75d003 100644
--- a/test/suites/ps/CMakeLists.txt
+++ b/test/suites/ps/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -72,8 +72,8 @@
         PRIVATE
             tfm_test_framework_s
             platform_region_defs
-            tfm_partition_ps
-            $<$<NOT:$<BOOL:${FORWARD_PROT_MSG}>>:tfm_partition_ps_test>
+            tfm_app_rot_partition_ps
+            $<$<NOT:$<BOOL:${FORWARD_PROT_MSG}>>:tfm_psa_rot_partition_ps_test>
             tfm_spm
             platform_s
     )
diff --git a/test/test_services/tfm_core_test/CMakeLists.txt b/test/test_services/tfm_core_test/CMakeLists.txt
index 59db3ef..5c2ec11 100644
--- a/test/test_services/tfm_core_test/CMakeLists.txt
+++ b/test/test_services/tfm_core_test/CMakeLists.txt
@@ -1,33 +1,33 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_core_test STATIC)
+add_library(tfm_psa_rot_partition_core_test STATIC)
 
-target_sources(tfm_partition_core_test
+target_sources(tfm_psa_rot_partition_core_test
     PRIVATE
         tfm_ss_core_test.c
 )
 
 # The generated sources
-target_sources(tfm_partition_core_test
+target_sources(tfm_psa_rot_partition_core_test
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_core_test/auto_generated/intermedia_tfm_ss_core_test.c>
 )
 
-target_include_directories(tfm_partition_core_test
+target_include_directories(tfm_psa_rot_partition_core_test
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_core_test
 )
 
-target_link_libraries(tfm_partition_core_test
+target_link_libraries(tfm_psa_rot_partition_core_test
     PRIVATE
         tfm_secure_api
         psa_interface
@@ -38,7 +38,7 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_core_test
+        tfm_psa_rot_partition_core_test
 )
 
 target_include_directories(tfm_test_framework_s
@@ -47,9 +47,9 @@
 )
 
 # header files included by other libraries
-add_library(tfm_partition_core_test_defs INTERFACE)
+add_library(tfm_psa_rot_partition_core_test_defs INTERFACE)
 
-target_include_directories(tfm_partition_core_test_defs
+target_include_directories(tfm_psa_rot_partition_core_test_defs
     INTERFACE
         .
 )
@@ -58,7 +58,7 @@
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_core_test
+        tfm_psa_rot_partition_core_test
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_core_test_2/CMakeLists.txt b/test/test_services/tfm_core_test_2/CMakeLists.txt
index cf9fd1a..42bd140 100644
--- a/test/test_services/tfm_core_test_2/CMakeLists.txt
+++ b/test/test_services/tfm_core_test_2/CMakeLists.txt
@@ -1,51 +1,51 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_core_test_2 STATIC)
+add_library(tfm_app_rot_partition_core_test_2 STATIC)
 
-target_sources(tfm_partition_core_test_2
+target_sources(tfm_app_rot_partition_core_test_2
     PRIVATE
         tfm_ss_core_test_2.c
 )
 
 # The generated sources
-target_sources(tfm_partition_core_test_2
+target_sources(tfm_app_rot_partition_core_test_2
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_core_test_2/auto_generated/intermedia_tfm_ss_core_test_2.c>
 )
 
-target_include_directories(tfm_partition_core_test_2
+target_include_directories(tfm_app_rot_partition_core_test_2
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_core_test_2
 )
 
-target_link_libraries(tfm_partition_core_test_2
+target_link_libraries(tfm_app_rot_partition_core_test_2
     PRIVATE
         tfm_secure_api
         psa_interface
         platform_s
-        tfm_partition_core_test
+        tfm_psa_rot_partition_core_test
         tfm_arch
 )
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_core_test_2
+        tfm_app_rot_partition_core_test_2
 )
 
 ############################ Partition Defs ####################################
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_core_test_2
+        tfm_app_rot_partition_core_test_2
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_ipc_client/CMakeLists.txt b/test/test_services/tfm_ipc_client/CMakeLists.txt
index e4eeeb2..2ab16ab 100644
--- a/test/test_services/tfm_ipc_client/CMakeLists.txt
+++ b/test/test_services/tfm_ipc_client/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,21 +7,21 @@
 
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_ipc_client STATIC)
+add_library(tfm_app_rot_partition_ipc_client STATIC)
 
-target_sources(tfm_partition_ipc_client
+target_sources(tfm_app_rot_partition_ipc_client
     PRIVATE
         ./tfm_ipc_client_test.c
 )
 
 # The generated sources
-target_sources(tfm_partition_ipc_client
+target_sources(tfm_app_rot_partition_ipc_client
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_ipc_client/auto_generated/intermedia_tfm_ipc_client_test.c>
 )
 
-target_include_directories(tfm_partition_ipc_client
+target_include_directories(tfm_app_rot_partition_ipc_client
     PUBLIC
         .
     PRIVATE
@@ -29,7 +29,7 @@
         ${CMAKE_CURRENT_SOURCE_DIR}/../tfm_secure_client_2
 )
 
-target_link_libraries(tfm_partition_ipc_client
+target_link_libraries(tfm_app_rot_partition_ipc_client
     PRIVATE
         tfm_secure_api
         psa_interface
@@ -38,14 +38,14 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_ipc_client
+        tfm_app_rot_partition_ipc_client
 )
 
 ############################ Partition Defs ####################################
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_ipc_client
+        tfm_app_rot_partition_ipc_client
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_ipc_service/CMakeLists.txt b/test/test_services/tfm_ipc_service/CMakeLists.txt
index 3a1d97d..198dcc7 100644
--- a/test/test_services/tfm_ipc_service/CMakeLists.txt
+++ b/test/test_services/tfm_ipc_service/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,28 +7,28 @@
 
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_ipc_service STATIC)
+add_library(tfm_psa_rot_partition_ipc_service STATIC)
 
-target_sources(tfm_partition_ipc_service
+target_sources(tfm_psa_rot_partition_ipc_service
     PRIVATE
         ./tfm_ipc_service_test.c
 )
 
 # The generated sources
-target_sources(tfm_partition_ipc_service
+target_sources(tfm_psa_rot_partition_ipc_service
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_ipc_service/auto_generated/intermedia_tfm_ipc_service_test.c>
 )
 
-target_include_directories(tfm_partition_ipc_service
+target_include_directories(tfm_psa_rot_partition_ipc_service
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_ipc_service
 )
 
-target_link_libraries(tfm_partition_ipc_service
+target_link_libraries(tfm_psa_rot_partition_ipc_service
     PRIVATE
         tfm_secure_api
         platform_s
@@ -38,14 +38,14 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_ipc_service
+        tfm_psa_rot_partition_ipc_service
 )
 
 ############################ Partition Defs ####################################
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_ipc_service
+        tfm_psa_rot_partition_ipc_service
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_irq_test_service_1/CMakeLists.txt b/test/test_services/tfm_irq_test_service_1/CMakeLists.txt
index f289f3c..5c0b285 100644
--- a/test/test_services/tfm_irq_test_service_1/CMakeLists.txt
+++ b/test/test_services/tfm_irq_test_service_1/CMakeLists.txt
@@ -1,33 +1,33 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_irq_test_1 STATIC)
+add_library(tfm_app_rot_partition_irq_test_1 STATIC)
 
-target_sources(tfm_partition_irq_test_1
+target_sources(tfm_app_rot_partition_irq_test_1
     PRIVATE
         ./tfm_irq_test_service_1.c
 )
 
 # The generated sources
-target_sources(tfm_partition_irq_test_1
+target_sources(tfm_app_rot_partition_irq_test_1
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_irq_test_service_1/auto_generated/intermedia_tfm_irq_test_service_1.c>
 )
 
-target_include_directories(tfm_partition_irq_test_1
+target_include_directories(tfm_app_rot_partition_irq_test_1
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_irq_test_service_1
 )
 
-target_link_libraries(tfm_partition_irq_test_1
+target_link_libraries(tfm_app_rot_partition_irq_test_1
     PRIVATE
         tfm_secure_api
         psa_interface
@@ -37,7 +37,7 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_irq_test_1
+        tfm_app_rot_partition_irq_test_1
 )
 
 target_include_directories(tfm_test_framework_s
@@ -49,7 +49,7 @@
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_irq_test_1
+        tfm_app_rot_partition_irq_test_1
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_ps_test_service/CMakeLists.txt b/test/test_services/tfm_ps_test_service/CMakeLists.txt
index 9eeb037..f599851 100644
--- a/test/test_services/tfm_ps_test_service/CMakeLists.txt
+++ b/test/test_services/tfm_ps_test_service/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -10,38 +10,38 @@
     return()
 endif()
 
-add_library(tfm_partition_ps_test STATIC)
+add_library(tfm_psa_rot_partition_ps_test STATIC)
 
-target_sources(tfm_partition_ps_test
+target_sources(tfm_psa_rot_partition_ps_test
     PRIVATE
         ./tfm_ps_test_service.c
 )
 
 # The generated sources
-target_sources(tfm_partition_ps_test
+target_sources(tfm_psa_rot_partition_ps_test
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_ps_test_service/auto_generated/intermedia_tfm_ps_test_service.c>
 )
 
-target_include_directories(tfm_partition_ps_test
+target_include_directories(tfm_psa_rot_partition_ps_test
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_ps_test_service
 )
 
-target_link_libraries(tfm_partition_ps_test
+target_link_libraries(tfm_psa_rot_partition_ps_test
     PRIVATE
         tfm_secure_api
         psa_interface
         platform_s
-        tfm_partition_ps
+        tfm_app_rot_partition_ps
 )
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_ps_test
+        tfm_psa_rot_partition_ps_test
 )
 
 ############################ Secure API ########################################
@@ -62,7 +62,7 @@
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_ps_test
+        tfm_psa_rot_partition_ps_test
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_secure_client_2/CMakeLists.txt b/test/test_services/tfm_secure_client_2/CMakeLists.txt
index 4296dc8..85beccd 100644
--- a/test/test_services/tfm_secure_client_2/CMakeLists.txt
+++ b/test/test_services/tfm_secure_client_2/CMakeLists.txt
@@ -1,33 +1,33 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_secure_client_2 STATIC)
+add_library(tfm_app_rot_partition_secure_client_2 STATIC)
 
-target_sources(tfm_partition_secure_client_2
+target_sources(tfm_app_rot_partition_secure_client_2
     PRIVATE
         ./tfm_secure_client_2.c
 )
 
 # The generated sources
-target_sources(tfm_partition_secure_client_2
+target_sources(tfm_app_rot_partition_secure_client_2
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_secure_client_2/auto_generated/intermedia_tfm_secure_client_2.c>
 )
 
-target_include_directories(tfm_partition_secure_client_2
+target_include_directories(tfm_app_rot_partition_secure_client_2
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_secure_client_2
 )
 
-target_link_libraries(tfm_partition_secure_client_2
+target_link_libraries(tfm_app_rot_partition_secure_client_2
     PRIVATE
         tfm_secure_api
         psa_interface
@@ -36,7 +36,7 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_secure_client_2
+        tfm_app_rot_partition_secure_client_2
 )
 
 ############################ Secure API ########################################
@@ -57,7 +57,7 @@
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_secure_client_2
+        tfm_app_rot_partition_secure_client_2
 )
 
 target_compile_definitions(tfm_partition_defs
diff --git a/test/test_services/tfm_secure_client_service/CMakeLists.txt b/test/test_services/tfm_secure_client_service/CMakeLists.txt
index 9ea4602..519ebad 100644
--- a/test/test_services/tfm_secure_client_service/CMakeLists.txt
+++ b/test/test_services/tfm_secure_client_service/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,28 +7,28 @@
 
 cmake_policy(SET CMP0079 NEW)
 
-add_library(tfm_partition_secure_client_service STATIC)
+add_library(tfm_psa_rot_partition_secure_client_service STATIC)
 
-target_sources(tfm_partition_secure_client_service
+target_sources(tfm_psa_rot_partition_secure_client_service
     PRIVATE
         ./tfm_secure_client_service.c
 )
 
 # The generated sources
-target_sources(tfm_partition_secure_client_service
+target_sources(tfm_psa_rot_partition_secure_client_service
     PRIVATE
         $<$<BOOL:${TFM_PSA_API}>:
             ${CMAKE_BINARY_DIR}/generated/test_services/tfm_secure_client_service/auto_generated/intermedia_tfm_secure_client_service.c>
 )
 
-target_include_directories(tfm_partition_secure_client_service
+target_include_directories(tfm_psa_rot_partition_secure_client_service
     PUBLIC
         .
     PRIVATE
         ${CMAKE_BINARY_DIR}/generated/test_services/tfm_secure_client_service
 )
 
-target_link_libraries(tfm_partition_secure_client_service
+target_link_libraries(tfm_psa_rot_partition_secure_client_service
     PRIVATE
         tfm_secure_api
         psa_interface
@@ -39,7 +39,7 @@
 
 target_link_libraries(tfm_spm
     PRIVATE
-        tfm_partition_secure_client_service
+        tfm_psa_rot_partition_secure_client_service
 )
 
 ############################ NS API ############################################
@@ -65,7 +65,7 @@
 
 target_link_libraries(tfm_partitions
     INTERFACE
-        tfm_partition_secure_client_service
+        tfm_psa_rot_partition_secure_client_service
 )
 
 target_compile_definitions(tfm_partition_defs