Build: Update Partition conditions attributes in manifest list
This patch:
- adds two new Partition configurations to combine multiple conditions
into one. They are internal only - not for user configurations.
- adds the SFN test Partition CMake configuration variables
- aligns the conditions of test Partitions in manifest list with
corresponding CMake configurations used to add_subdirectory of
Partitions.
- passes Test Partition enabled status to manifest tool by adding
'@...@' around 'conditional' in manifest list.
Change-Id: I9d9a6a63eccfc0df22783ca1ad54a1b4dc7f628a
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/test/config/default_test_config.cmake b/test/config/default_test_config.cmake
index 7924e77..7f3deee 100644
--- a/test/config/default_test_config.cmake
+++ b/test/config/default_test_config.cmake
@@ -26,6 +26,7 @@
set(TEST_NS_FLIH_IRQ OFF CACHE BOOL "Whether to build NS regression First-Level Interrupt Handling tests")
set(TEST_NS_MULTI_CORE OFF CACHE BOOL "Whether to build NS regression multi-core tests")
set(TEST_NS_MANAGE_NSID OFF CACHE BOOL "Whether to build NS regression NSID management tests")
+set(TEST_NS_SFN_BACKEND OFF CACHE BOOL "Whether to build NS regression SFN backend tests")
########################## S test framework ####################################
diff --git a/test/config/set_config.cmake b/test/config/set_config.cmake
index e059aab..93baa8e 100644
--- a/test/config/set_config.cmake
+++ b/test/config/set_config.cmake
@@ -123,4 +123,17 @@
include(${TFM_TEST_PATH}/config/default_ns_test_config.cmake)
endif()
+###################### Test Partition configurations ###########################
+if (TEST_NS_IPC OR TEST_S_IPC)
+ set(TFM_PARTITION_IPC_TEST ON)
+else()
+ set(TFM_PARTITION_IPC_TEST OFF)
+endif()
+
+if (TEST_NS_ATTESTATION OR TEST_S_ATTESTATION)
+ set(TFM_PARTITION_ATTESTATION_TEST ON)
+else()
+ set(TFM_PARTITION_ATTESTATION_TEST OFF)
+endif()
+
include(${TFM_TEST_PATH}/config/default_test_config.cmake)
diff --git a/test/test_services/CMakeLists.txt b/test/test_services/CMakeLists.txt
index f2b6b8a..b894765 100644
--- a/test/test_services/CMakeLists.txt
+++ b/test/test_services/CMakeLists.txt
@@ -10,7 +10,7 @@
set(TEST_SERVICE_SRC_INSTALL_DIR ${TFM_INSTALL_PATH}/interface/src/test_service)
set(TEST_SERVICE_INC_INSTALL_DIR ${TFM_INSTALL_PATH}/interface/include/test_service)
-if (TEST_NS_ATTESTATION OR TEST_S_ATTESTATION)
+if (TFM_PARTITION_ATTESTATION_TEST)
add_subdirectory(tfm_attest_test_service)
endif()
@@ -19,7 +19,7 @@
add_subdirectory(tfm_core_test_2)
endif()
-if (TFM_PSA_API)
+if (TFM_PARTITION_IPC_TEST)
add_subdirectory(tfm_ipc_client)
add_subdirectory(tfm_ipc_service)
endif()
diff --git a/test/test_services/tfm_test_manifest_list.yaml b/test/test_services/tfm_test_manifest_list.yaml
index 92def39..791b64f 100644
--- a/test/test_services/tfm_test_manifest_list.yaml
+++ b/test/test_services/tfm_test_manifest_list.yaml
@@ -16,7 +16,7 @@
"short_name": "TFM_SP_CORE_TEST",
"manifest": "tfm_core_test/tfm_ss_core_test.yaml",
"output_path": "test_services/tfm_core_test",
- "conditional": "TFM_PARTITION_TEST_CORE",
+ "conditional": "@TEST_NS_CORE@",
"version_major": 0,
"version_minor": 1,
"pid": 262,
@@ -31,7 +31,7 @@
"short_name": "TFM_SP_CORE_TEST_2",
"manifest": "tfm_core_test_2/tfm_ss_core_test_2.yaml",
"output_path": "test_services/tfm_core_test_2",
- "conditional": "TFM_PARTITION_TEST_CORE",
+ "conditional": "@TEST_NS_CORE@",
"version_major": 0,
"version_minor": 1,
"pid": 263,
@@ -46,7 +46,7 @@
"short_name": "TFM_SP_SECURE_TEST_PARTITION",
"manifest": "tfm_secure_client_service/tfm_secure_client_service.yaml",
"output_path": "test_services/tfm_secure_client_service",
- "conditional": "TFM_PARTITION_TEST_SECURE_SERVICES",
+ "conditional": "@TEST_FRAMEWORK_S@",
"version_major": 0,
"version_minor": 1,
"pid": 264,
@@ -61,7 +61,7 @@
"short_name": "TFM_SP_IPC_SERVICE_TEST",
"manifest": "tfm_ipc_service/tfm_ipc_service_test.yaml",
"output_path": "test_services/tfm_ipc_service",
- "conditional": "TFM_PARTITION_TEST_CORE_IPC",
+ "conditional": "@TFM_PARTITION_IPC_TEST@",
"version_major": 0,
"version_minor": 1,
"pid": 265,
@@ -76,7 +76,7 @@
"short_name": "TFM_SP_IPC_CLIENT_TEST",
"manifest": "tfm_ipc_client/tfm_ipc_client_test.yaml",
"output_path": "test_services/tfm_ipc_client",
- "conditional": "TFM_PARTITION_TEST_CORE_IPC",
+ "conditional": "@TFM_PARTITION_IPC_TEST@",
"version_major": 0,
"version_minor": 1,
"pid": 266,
@@ -91,7 +91,7 @@
"short_name": "TFM_SP_PS_TEST",
"manifest": "tfm_ps_test_service/tfm_ps_test_service.yaml",
"output_path": "test_services/tfm_ps_test_service",
- "conditional": "TFM_PARTITION_TEST_PS",
+ "conditional": "@TEST_S_PS@",
"version_major": 0,
"version_minor": 1,
"pid": 268,
@@ -106,7 +106,7 @@
"short_name": "TFM_SP_SECURE_CLIENT_2",
"manifest": "tfm_secure_client_2/tfm_secure_client_2.yaml",
"output_path": "test_services/tfm_secure_client_2",
- "conditional": "TFM_PARTITION_TEST_SECURE_SERVICES",
+ "conditional": "@TEST_FRAMEWORK_S@",
"version_major": 0,
"version_minor": 1,
"pid": 269,
@@ -121,7 +121,7 @@
"short_name": "TFM_ATTEST_TEST_SERVICE",
"manifest": "tfm_attest_test_service/tfm_attest_test_service.yaml",
"output_path": "test_services/tfm_attest_test_service",
- "conditional": "ATTEST_TEST_GET_PUBLIC_KEY",
+ "conditional": "@TFM_PARTITION_ATTESTATION_TEST@",
"version_major": 0,
"version_minor": 1,
"pid": 272,
@@ -136,7 +136,7 @@
"short_name": "TFM_SP_SLIH_TEST",
"manifest": "tfm_slih_test_service/tfm_slih_test_service.yaml",
"output_path": "test_services/tfm_slih_test_service",
- "conditional": "TEST_NS_SLIH_IRQ",
+ "conditional": "@TEST_NS_SLIH_IRQ@",
"version_major": 0,
"version_minor": 1,
"linker_pattern": {
@@ -150,7 +150,7 @@
"short_name": "TFM_SP_FLIH_TEST",
"manifest": "tfm_flih_test_service/tfm_flih_test_service.yaml",
"output_path": "test_services/tfm_flih_test_service",
- "conditional": "TEST_NS_FLIH_IRQ",
+ "conditional": "@TEST_NS_FLIH_IRQ@",
"version_major": 0,
"version_minor": 1,
"linker_pattern": {
diff --git a/test/test_services/tfm_test_sfn_manifest_list.yaml b/test/test_services/tfm_test_sfn_manifest_list.yaml
index b0aebd8..b421b25 100644
--- a/test/test_services/tfm_test_sfn_manifest_list.yaml
+++ b/test/test_services/tfm_test_sfn_manifest_list.yaml
@@ -16,7 +16,7 @@
"short_name": "TFM_SFN_SP1",
"manifest": "tfm_test_sfn_partitions/sfn_partition1/sfn_partition1.yaml",
"output_path": "test_services/sfn_partition1",
- "conditional": "TFM_PARTITION_SFN1",
+ "conditional": "@TEST_NS_SFN_BACKEND@",
"version_major": 0,
"version_minor": 1,
"linker_pattern": {
@@ -30,7 +30,7 @@
"short_name": "TFM_SFN_SP2",
"manifest": "tfm_test_sfn_partitions/sfn_partition2/sfn_partition2.yaml",
"output_path": "test_services/sfn_partition2",
- "conditional": "TFM_PARTITION_SFN2",
+ "conditional": "@TEST_NS_SFN_BACKEND@",
"version_major": 0,
"version_minor": 1,
"linker_pattern": {