Build: Add conditional build for secure partitions
This is already the mechanism to build secure partitions conditionally.
Only audit log and platform service partitions were using it.
This patch applies it to the reset of the secure partitions and
takes care of the dependencies.
Change-Id: Icc94db113cf90ed20c84c57a52e85756dba342f0
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/test/TestConfig.cmake b/test/TestConfig.cmake
index dd9d6f2..8d97178 100644
--- a/test/TestConfig.cmake
+++ b/test/TestConfig.cmake
@@ -12,3 +12,28 @@
option(ENABLE_ATTESTATION_SERVICE_TESTS "Option for attestation service tests" TRUE)
option(ENABLE_PLATFORM_SERVICE_TESTS "Option for platform service tests" TRUE)
option(ENABLE_QCBOR_TESTS "Option for qcbor tests" TRUE)
+
+# If a partition is not enabled, then neither should its tests.
+if (NOT TFM_PARTITION_SECURE_STORAGE)
+ set(ENABLE_SECURE_STORAGE_SERVICE_TESTS FALSE)
+endif()
+
+if (NOT TFM_PARTITION_INTERNAL_TRUSTED_STORAGE)
+ set(ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS FALSE)
+endif()
+
+if (NOT TFM_PARTITION_CRYPTO)
+ set(ENABLE_CRYPTO_SERVICE_TESTS FALSE)
+endif()
+
+if (NOT TFM_PARTITION_INITIAL_ATTESTATION)
+ set(ENABLE_ATTESTATION_SERVICE_TESTS FALSE)
+endif()
+
+if (NOT TFM_PARTITION_PLATFORM)
+ set(ENABLE_PLATFORM_SERVICE_TESTS FALSE)
+endif()
+
+if (NOT TFM_PARTITION_AUDIT_LOG)
+ set(ENABLE_AUDIT_LOGGING_SERVICE_TESTS FALSE)
+endif()