Build: Only build secure test partition if needed

Changes the build system so that the secure client test partition is
not built by the core tests or core IPC tests as it not required by
these tests.

Change-Id: I80b29d8fb846a61bea6344c6900c97afa9f4aa64
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 6bb1f4f..4f43cf9 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -105,7 +105,6 @@
 set (TFM_PARTITION_TEST_CORE OFF)
 set (CORE_TEST_POSITIVE OFF)
 set (CORE_TEST_INTERACTIVE OFF)
-set (TEST_FRAMEWORK_S OFF)
 set (REFERENCE_PLATFORM OFF)
 set (TFM_PARTITION_TEST_SECURE_SERVICES OFF)
 set (SERVICES_TEST_ENABLED OFF)
@@ -152,8 +151,6 @@
 if (CORE_TEST)
 	set(CORE_TEST_POSITIVE ON)
 	set(CORE_TEST_INTERACTIVE OFF)
-	set(TFM_PARTITION_TEST_SECURE_SERVICES ON)
-	add_definitions(-DTFM_PARTITION_TEST_SECURE_SERVICES)
 endif()
 
 if (CORE_TEST_INTERACTIVE)
@@ -170,7 +167,6 @@
 
 if (CORE_TEST_IPC)
 	add_definitions(-DCORE_TEST_IPC)
-	set(TFM_PARTITION_TEST_SECURE_SERVICES ON)
 	# If PSA_API_TEST is enabled, don't run TF-M test framework from NS
 	if (PSA_API_TEST)
 	  set(TEST_FRAMEWORK_NS OFF)
@@ -182,7 +178,6 @@
 if (SERVICE_TEST_S)
 	add_definitions(-DSERVICES_TEST_S)
 	set(TEST_FRAMEWORK_S ON)
-	set(TFM_PARTITION_TEST_SECURE_SERVICES ON)
 endif()
 
 if (SERVICE_TEST_NS)
@@ -192,6 +187,8 @@
 
 if (TEST_FRAMEWORK_S)
 	add_definitions(-DTEST_FRAMEWORK_S)
+	# The secure client partition is required to run secure tests
+	set(TFM_PARTITION_TEST_SECURE_SERVICES ON)
 endif()
 
 if (TEST_FRAMEWORK_NS)